File tree Expand file tree Collapse file tree 4 files changed +25
-6
lines changed
Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 4141 "configurations" : {
4242 "on" : " \" color\" : \" green\" "
4343 },
44- "sets" : [" set_a" ]
45- }
44+ "sets" : [
45+ " set_a"
46+ ],
47+ "prerequisites" : [
48+ {
49+ "n" : " some_flag" ,
50+ "ts" : [
51+ " on"
52+ ]
53+ }
54+ ]
55+ }
Original file line number Diff line number Diff line change 99 },
1010 "sets" : [" set_a" ],
1111 "defaultTreatment" : " off" ,
12- "impressionsDisabled" : false
13- }
12+ "impressionsDisabled" : false ,
13+ "prerequisites" : [{
14+ "flagName" : " some_flag" ,
15+ "treatments" : [" on" ]
16+ }]
17+ }
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ function objectToView(splitObject: ISplit | null): SplitIO.SplitView | null {
3232 configs : splitObject . configurations || { } ,
3333 sets : splitObject . sets || [ ] ,
3434 defaultTreatment : splitObject . defaultTreatment ,
35- impressionsDisabled : splitObject . impressionsDisabled === true
35+ impressionsDisabled : splitObject . impressionsDisabled === true ,
36+ prerequisites : ( splitObject . prerequisites || [ ] ) . map ( p => ( { flagName : p . n , treatments : p . ts } ) ) ,
3637 } ;
3738}
3839
Original file line number Diff line number Diff line change @@ -842,7 +842,7 @@ declare namespace SplitIO {
842842 /**
843843 * The list of treatments available for the feature flag.
844844 */
845- treatments : Array < string > ;
845+ treatments : string [ ] ;
846846 /**
847847 * Current change number of the feature flag.
848848 */
@@ -866,6 +866,10 @@ declare namespace SplitIO {
866866 * Whether the feature flag has impressions tracking disabled or not.
867867 */
868868 impressionsDisabled : boolean ;
869+ /**
870+ * Prerequisites for the feature flag.
871+ */
872+ prerequisites : Array < { flagName : string , treatments : string [ ] } > ;
869873 } ;
870874 /**
871875 * A promise that resolves to a feature flag view or null if the feature flag is not found.
You can’t perform that action at this time.
0 commit comments