Skip to content

Commit e7be20c

Browse files
committed
feat: Exported typescript types for Akamai SDK
1 parent 5d2ee4e commit e7be20c

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

packages/sdk/akamai-base/src/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,20 @@
1212
import {
1313
init as initEdge,
1414
LDClient,
15-
LDContext,
16-
LDMultiKindContext,
17-
LDSingleKindContext,
1815
LDOptions,
1916
EdgeProvider,
2017
EdgeFeatureStore,
2118
} from '@launchdarkly/akamai-edgeworker-sdk-common';
2219
import { BasicLogger } from '@launchdarkly/js-server-sdk-common';
2320

24-
type AkamaiLDClientParams = {
21+
export * from '@launchdarkly/akamai-edgeworker-sdk-common';
22+
23+
export type AkamaiLDClientParams = {
2524
sdkKey: string;
2625
options?: LDOptions;
2726
featureStoreProvider: EdgeProvider;
2827
};
2928

30-
export type { LDClient, LDContext, LDMultiKindContext, LDSingleKindContext, EdgeProvider };
31-
3229
/**
3330
* Initialize Launchdarkly client using Akamai's Edge KV as a feature store
3431
* @param params ClientWithEdgeKVParams

packages/sdk/akamai-edgekv/src/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,21 @@
1212
import {
1313
init as initEdge,
1414
LDClient,
15-
LDContext,
16-
LDMultiKindContext,
17-
LDSingleKindContext,
1815
LDOptions,
1916
EdgeFeatureStore,
2017
} from '@launchdarkly/akamai-edgeworker-sdk-common';
2118
import { BasicLogger } from '@launchdarkly/js-server-sdk-common';
2219
import EdgeKVProvider from './edgekv/edgeKVProvider';
2320

24-
type AkamaiLDClientParams = {
21+
export * from '@launchdarkly/akamai-edgeworker-sdk-common';
22+
23+
export type AkamaiLDClientParams = {
2524
sdkKey: string;
2625
options?: LDOptions;
2726
namespace: string;
2827
group: string;
2928
};
3029

31-
export type { LDClient, LDContext, LDMultiKindContext, LDSingleKindContext };
32-
3330
/**
3431
* Initialize Launchdarkly client using Akamai's Edge KV as a feature store
3532
* @param params ClientWithEdgeKVParams

packages/shared/akamai-edgeworker-sdk/src/index.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,24 @@ import LDClient from './api/LDClient';
1111
import EdgePlatform from './platform';
1212
import createPlatformInfo from './platform/info';
1313
import type { EdgeProvider } from './featureStore';
14+
import { EdgeFeatureStore } from './featureStore';
15+
import { LDOptions as LDOptionsCommon } from '@launchdarkly/js-server-sdk-common';
1416

15-
export { EdgeFeatureStore } from './featureStore';
17+
/**
18+
* The Launchdarkly Edge SDKs configuration options. Only logger is officially
19+
* supported. sendEvents is unsupported and is only included as a beta
20+
* preview.
21+
*/
22+
type LDOptions = Pick<LDOptionsCommon, 'logger' | 'sendEvents'>;
1623

17-
export type {
18-
LDClient,
19-
LDContext,
20-
LDMultiKindContext,
21-
LDSingleKindContext,
22-
LDOptions,
23-
EdgeProvider,
24-
};
24+
/**
25+
* The internal options include featureStore because that's how the LDClient
26+
* implementation expects it.
27+
*/
28+
type LDOptionsInternal = LDOptions & Pick<LDOptionsCommon, 'featureStore'>;
29+
30+
export * from '@launchdarkly/js-server-sdk-common';
31+
export { EdgeFeatureStore, EdgeProvider, LDOptions, LDOptionsInternal };
2532

2633
type BaseSDKParams = {
2734
sdkKey: string;

0 commit comments

Comments
 (0)