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

Update knex types for TS 4.7 #5095

Merged
merged 3 commits into from Apr 4, 2022
Merged

Update knex types for TS 4.7 #5095

merged 3 commits into from Apr 4, 2022

Conversation

weswigham
Copy link
Contributor

Mostly, this involves adding a lot of missing type parameter constraints - in older versions of TS, we'd let an unconstrained type parameter be used where a type parameter extending {} is expected - in 4.7, we fix this.

@kibertoad
Copy link
Collaborator

Tests are failing.

@weswigham
Copy link
Contributor Author

That should do it, I hope - the explicit {} constraints require some of the any-swapping logic done for unknown to also need to apply to exactly {} (since now when inference fails for those parameters, they'll be {} instead of unknown).

@weswigham
Copy link
Contributor Author

I only changed the types, so I can't really answer why the (12.x, pgnative) CI build is failing - kinda doubt it has to do with this.

@weswigham
Copy link
Contributor Author

@kibertoad ?

@kibertoad kibertoad merged commit 359b29c into knex:master Apr 4, 2022
@kibertoad
Copy link
Collaborator

Released in 1.0.5

@glensc
Copy link
Contributor

glensc commented May 30, 2022

Does this mean that downstream projects need also to update their typescript to 4.7?

@kibertoad
Copy link
Collaborator

@glensc I think it should work with earlier version too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants