Skip to content

Commit

Permalink
revising EventName typing
Browse files Browse the repository at this point in the history
  • Loading branch information
tanderson-ld committed Oct 4, 2024
1 parent 79a3170 commit 8a965d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/shared/sdk-client/src/LDEmitter.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { LDLogger } from '@launchdarkly/js-sdk-common';

type FlagChangeKey = `change:${string}`;

/**
* Type for name of emitted events. 'change' is used for all flag changes. 'change:flag-name-here' is used
* for specific flag changes.
*/
export type EventName = 'change' | 'dataSourceStatus' | 'error' | string;
export type EventName = 'change' | FlagChangeKey | 'dataSourceStatus' | 'error';

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

0 comments on commit 8a965d2

Please sign in to comment.