function adaptLaunchDarklyModule
Since 0.2.0
adaptLaunchDarklyModule(module: unknown): ILaunchDarklyModule

Narrows an arbitrary module object to ILaunchDarklyModule.

Pure and synchronous, so the provider's construction path is unit-testable with a fake module and never needs the real package installed.

Parameters

module: unknown

The module to adapt, typically the result of import('npm:@launchdarkly/node-server-sdk')

Return Type

The adapted module facade

Throws

LaunchDarklyModuleError

When module is not an object, or exposes no callable init

Usage

import { adaptLaunchDarklyModule } from "feature-flags-plugin/src/index.ts";