Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX LTS] Fix runloop types on TS 5.0+ #20400

Closed
wants to merge 1 commit into from
Closed

Conversation

chriskrycho
Copy link
Contributor

@chriskrycho chriskrycho commented Mar 4, 2023

TS 5.0 catches a new set of assignability errors here, and our (very) complicated set of types for bind and friends got flagged by that. The terminal case for PartialParams needs to be a fixed empty tuple rather than never, so that the type system can see that it will be resolved as 'no arguments' rather than 'nothing' in that scenario.

Note: this fixes the one bug on our side. There is also a bug fix in the latest TS nightly (typescript@next) build, which combined with this PR should get us unblocked against TS nightlies again. We're in good shape for TS 5.0 and the upcoming 5.1 as a result!

Note: I have marked this as BUGFIX LTS because it affects our build. End users will not be affected by these changes until we have types publishing from source for this (presumably in 5.1 or 5.2), but any fixes we do make to 4.8 or 4.12 will see this in their CI runs, so we need to back-port it.

TS 5.0 catches a new set of assignability errors here, and our (very)
complicated set of types for `bind` and friends got flagged by that.
The terminal case for `PartialParams` needs to be a fixed empty tuple
rather than `never`, so that the type system can see that it will be
resolved as 'no arguments' rather than 'nothing' in that scenario.
@chriskrycho chriskrycho added Bug TypeScript Work on Ember’s types labels Mar 4, 2023
@chriskrycho chriskrycho changed the title [BUGFIX LTS] Fix runloop types on TS 5.0+ [BUGFIX beta] Fix runloop types on TS 5.0+ Mar 4, 2023
@chriskrycho chriskrycho changed the title [BUGFIX beta] Fix runloop types on TS 5.0+ [BUGFIX LTS] Fix runloop types on TS 5.0+ Mar 4, 2023
@chriskrycho
Copy link
Contributor Author

Duplicate of #20398. 🎉

@chriskrycho chriskrycho closed this Mar 4, 2023
@chriskrycho chriskrycho deleted the fix-ts-next branch March 4, 2023 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug TypeScript Work on Ember’s types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant