Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Add in scope-bound equivalents of addEvent, addEventInterval #6

Description

@JoshuaKGoldberg

Perhaps addEventBound and addEventIntervalBound?

See microsoft/TypeScript#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);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions