Added chance operators to inline help
This commit is contained in:
@ -27,6 +27,11 @@ export abstract class Event {
|
||||
return this;
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
never = (func: Function): Event => {
|
||||
return this;
|
||||
};
|
||||
|
||||
almostNever = (func: Function): Event => {
|
||||
return this.odds(0.025, func);
|
||||
};
|
||||
@ -55,6 +60,10 @@ export abstract class Event {
|
||||
return this.odds(0.985, func);
|
||||
};
|
||||
|
||||
always = (func: Function): Event => {
|
||||
return this.modify(func);
|
||||
};
|
||||
|
||||
modify = (func: Function): Event => {
|
||||
return func(this);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user