Skip to content

Conversation

@sandersn
Copy link
Contributor

@sandersn sandersn commented Jul 25, 2022

Typescript 4.8 assumes that unconstrained types extend unknown, not {} (which is unknown minus null and undefined). However, many uses still need to extend {}. This PR does that explicitly for objection's types.

See https://devblogs.microsoft.com/typescript/announcing-typescript-4-8-beta/#unconstrained-generics-no-longer-assignable-to

Typescript 4.8 assumes that unconstrained types extend `unknown`, not `{}` (which is `unknown` minus `null` and `undefined`). However, many uses still need to extend `{}`. This PR does that explicitly for objection's types.
@QholmesBRD
Copy link

This would be very helpful

@jorgebv
Copy link

jorgebv commented Sep 16, 2022

@koskimas is it reasonable to merge this and make a release? This currently prevents the use of objection with latest typescript versions

@kibertoad kibertoad merged commit dbb20ae into Vincit:master Sep 16, 2022
@jorgebv
Copy link

jorgebv commented Sep 26, 2022

@kibertoad thank you for merging the PR. Do you have the ability to make a release containing this fix, or do you know if a release is planned in the near future?

Thank you and other maintainers for all the work you do on this and other projects.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants