Created
March 6, 2018 10:57
-
-
Save mizrael/7b327d7aa16b14a8d21c8092c919117d to your computer and use it in GitHub Desktop.
Feature Gating - check the gates
This file contains 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
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