-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add js-user-persisted-storage package (#75)
* feat: add js-user-persisted-storage package * feat: add js-user-persisted-storage package * feat: add ability to fetch values * chore: split evaluation options into types * test: add user persisted storage test * chore: delete client-extensions package * chore: update readme precomp/on-device * feat: add persisted user storage example * refac: remove redundant exposure arg
- Loading branch information
1 parent
cbc297e
commit 63dafc3
Showing
50 changed files
with
1,325 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
export type EvaluationOptionsCommon = { | ||
/** | ||
* Prevents an exposure log being created for this check. | ||
* | ||
* default: `false` | ||
*/ | ||
disableExposureLog?: boolean; | ||
}; | ||
|
||
export type FeatureGateEvaluationOptions = EvaluationOptionsCommon & { | ||
// Feature Gate specific options | ||
}; | ||
|
||
export type DynamicConfigEvaluationOptions = EvaluationOptionsCommon & { | ||
// Dynamic Config specific options | ||
}; | ||
|
||
export type ExperimentEvaluationOptions = EvaluationOptionsCommon & { | ||
/** | ||
* Provide a map of values to be used across checks | ||
* | ||
* @requires {@link @statsig/js-user-persisted-storage} | ||
* @see {@link https://docs.statsig.com/client/concepts/persistent_assignment#example-usage} | ||
*/ | ||
userPersistedValues?: unknown; | ||
}; | ||
|
||
export type LayerEvaluationOptions = EvaluationOptionsCommon & { | ||
// Layer specific options | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export type Flatten<T> = { | ||
[K in keyof T]: T[K]; | ||
|
||
// Intentional: This is a utility type | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
} & {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.