Skip to content

Commit 04aa17e

Browse files
committed
improve check event docs
1 parent 10eae84 commit 04aa17e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/browser-sdk/src/feature/features.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export function flattenJSON(obj: Record<string, any>): Record<string, any> {
146146
*/
147147
export interface CheckEvent {
148148
/**
149-
* Action to perform.
149+
* `check-is-enabled` means `isEnabled` was checked, `check-config` means `config` was checked.
150150
*/
151151
action: "check-is-enabled" | "check-config";
152152

@@ -157,8 +157,10 @@ export interface CheckEvent {
157157

158158
/**
159159
* Result of feature flag or configuration evaluation.
160+
* If `action` is `check-is-enabled`, this is the result of the feature flag evaluation and `value` is a boolean.
161+
* If `action` is `check-config`, this is the result of the configuration evaluation.
160162
*/
161-
value: any;
163+
value?: boolean | { key: string; payload: any };
162164

163165
/**
164166
* Version of targeting rules.

0 commit comments

Comments
 (0)