-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Environment
Knex version: 2.2.0
Database + version: n/a (type check issue)
OS: Ubuntu 22.04
Typescript version: 4.8.0-beta (works fine with 4.7.4, so regression is from stricter type checking in 4.8)
tagging @lorefnon for typescript issue
Bug
.yarn/__virtual__/knex-virtual-a119e71548/0/cache/knex-npm-2.2.0-54a090c353-eff5161ece.zip/node_modules/knex/types/index.d.ts:453:33 - error TS2344: Type 'TRecord | TResult' does not satisfy the constraint '{}'.
Type 'TResult' is not assignable to type '{}'.
453 | Knex.QueryBuilder<TRecord | TResult>
~~~~~~~~~~~~~~~~~
.yarn/__virtual__/knex-virtual-a119e71548/0/cache/knex-npm-2.2.0-54a090c353-eff5161ece.zip/node_modules/knex/types/index.d.ts:447:38
447 fn: <TRecord extends {} = any, TResult = unknown[]>(
~~~~~~~~~~~~~~~~~~~
This type parameter might need an `extends {}` constraint.
Found 1 error in .yarn/__virtual__/knex-virtual-a119e71548/0/cache/knex-npm-2.2.0-54a090c353-eff5161ece.zip/node_modules/knex/types/index.d.ts:453
This is probably https://devblogs.microsoft.com/typescript/announcing-typescript-4-8-beta/#unconstrained-generics-no-longer-assignable-to
kompot, kevinsuh and kleenkanteen
Metadata
Metadata
Assignees
Labels
No labels