-
Notifications
You must be signed in to change notification settings - Fork 11
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
Optional feature flags in Pickles.sideLoaded
#277
Conversation
Pickles_types.Plonk_types.Features.map feature_flags_ ~f:(function | ||
| Some true -> | ||
Pickles_types.Opt.Flag.Yes | ||
| Some false -> | ||
Pickles_types.Opt.Flag.No | ||
| None -> | ||
Pickles_types.Opt.Flag.Maybe ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nicely done!
btw if you'd want to model Pickles_types.Opt.Flag.t
in TS, as an enum without contents it maps to 0 | 1 | 2
, where the order is determined by the order that Yes | No | Maybe
appear in the enum definition
{ identifier = Js.to_string rule##.identifier | ||
; feature_flags = rule##.featureFlags | ||
; feature_flags = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the type of the pickles rule here as well to match the rest (less different types we have to consinder in javascript or here)
No description provided.