Open JoshuaKGoldberg opened 8 years ago
Perhaps addEventBound and addEventIntervalBound?
addEventBound
addEventIntervalBound
See https://github.com/Microsoft/TypeScript/pull/6739 for guidance on implementation.
This will be useful for GameStartr projects: now that they're moving to not taking in the GameStartr instance as a first parameter, there will be some overhead in always having to pass () => scopes.
() =>
Old:
FSP.TimeHandler.addEvent(FSP.killNormal, 7, thing);
Current (either):
FSP.TimeHandler.addEvent(FSP.killNormal.bind(FSP), 7, thing); FSP.TimeHandler.addEvent((thing: IThing): void => FSP.killNormal(thing), 7, thing);
With this:
FSP.TimeHandler.addEventBound(FSP.killNormal, FSP, 7, thing);
See the discussion at https://github.com/palantir/tslint/issues/1449#issuecomment-238070857.
Perhaps
addEventBound
andaddEventIntervalBound
?See https://github.com/Microsoft/TypeScript/pull/6739 for guidance on implementation.
This will be useful for GameStartr projects: now that they're moving to not taking in the GameStartr instance as a first parameter, there will be some overhead in always having to pass
() =>
scopes.Old:
Current (either):
With this: