Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Commit 7842d0f

Browse files
committed
fix export, add TypeScript test
1 parent c2b51fe commit 7842d0f

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ declare module 'launchdarkly-node-server-sdk-consul' {
1313
/**
1414
* Create a feature flag store backed by Consul.
1515
*/
16-
export function ConsulFeatureStore(
16+
export default function ConsulFeatureStore(
1717
/**
1818
* Options for configuring the feature store.
1919
*/

test-types.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11

22
// This file exists only so that we can run the TypeScript compiler in the CI build
33
// to validate our index.d.ts file.
4+
5+
import ConsulFeatureStore, { LDConsulOptions } from 'launchdarkly-node-server-sdk-consul';
6+
import { LDLogger } from 'launchdarkly-node-server-sdk';
7+
8+
var emptyOptions: LDConsulOptions = {};
9+
10+
var logger: LDLogger = { error: () => {}, warn: () => {}, info: () => {}, debug: () => {} };
11+
12+
var options: LDConsulOptions = {
13+
consulOptions: {},
14+
prefix: 'x',
15+
cacheTTL: 30,
16+
logger: logger
17+
};

0 commit comments

Comments
 (0)