Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class T {
- private disallowedStates = [];
- constructor(disallowedStates) {
- this.disallowedStates = disallowedStates;
- }
- aMethod(x){
- assert(!disallowedStates.contains(x);
- const y = this.doSomething(x);
- const z = this.doAnotherThing(y);
- return z;
- },
- doSomething(x){
- // ...
- return y;
- },
- doAnotherThing(y){
- // ...
- return z;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement