Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds type var `T_Event` and uses it to type the `subscribe()` interfaces. Fixes an issue where subscribing a handler would raise a type error if the handler is typed to receive a subclass of `Event`. Allows type checkers to verify that the handler passed to `subscribe()` can support the event types it is assigned to handle. Closes #846
- Loading branch information
1 parent
5bb4d81
commit dec885a
Showing
5 changed files
with
16 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
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
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