Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generics for InMemoryProvider Flag config #1046

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wichopy
Copy link
Member

@wichopy wichopy commented Oct 19, 2024

This PR

  • adds this new feature

Related Issues

Fixes #1234523

Notes

Follow-up Tasks

How to test

Copy link
Member

@lukas-reining lukas-reining left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far!

Comment on lines +36 to 53
// sample
const flag: Flag<{
hi: boolean,
bye: boolean,
}> = {
variants: {
'hi': true,
bye: false,
},
disabled: false,
defaultVariant: 'hi',
contextEvaluator: (ctx: EvaluationContext) => {
if (ctx.user === '[email protected]') {
return 'bye';
}
return 'hi';
},
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was there for testing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants