Created
March 20, 2022 13:53
-
-
Save Weiyuan-Lane/b3a99b81ac63256e5e94f437b7acde66 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| async setAttributes(attrs: Object): Promise<void> { | |
| return this.growthbookSingleton.then((growthbook: GrowthBook) => { | |
| growthbook.setAttributes(attrs); | |
| this.triggerUpdate(); | |
| }) | |
| } | |
| async evalFeature<T extends FeatureValType>(featureKey: string): Promise<T | null> { | |
| return this.growthbookSingleton.then((growthbook: GrowthBook) => { | |
| const val = growthbook.evalFeature<T>(featureKey); | |
| return val.value; | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment