Skip to content

Instantly share code, notes, and snippets.

@mizrael
Created March 6, 2018 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mizrael/7b327d7aa16b14a8d21c8092c919117d to your computer and use it in GitHub Desktop.
Save mizrael/7b327d7aa16b14a8d21c8092c919117d to your computer and use it in GitHub Desktop.
Feature Gating - check the gates
interface IFoo{
bar():void;
}
interface FlagsConfig{
featureX:boolean;
}
export class Foo implements IFoo{
constructor(private readonly flagsConfig:FlagsConfig){}
public bar(){
if(this.flagsConfig.featureX){
/*.......*/
}else{
/*.......*/
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment