Skip to content

Commit 8a965d2

Browse files
committed
revising EventName typing
1 parent 79a3170 commit 8a965d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/shared/sdk-client/src/LDEmitter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { LDLogger } from '@launchdarkly/js-sdk-common';
22

3+
type FlagChangeKey = `change:${string}`;
4+
35
/**
46
* Type for name of emitted events. 'change' is used for all flag changes. 'change:flag-name-here' is used
57
* for specific flag changes.
68
*/
7-
export type EventName = 'change' | 'dataSourceStatus' | 'error' | string;
9+
export type EventName = 'change' | FlagChangeKey | 'dataSourceStatus' | 'error';
810

911
/**
1012
* Implementation Note: There should not be any default listeners for change events in a client

0 commit comments

Comments
 (0)