knex: Breaking change in 0.16.6 (when used with typescript)

Environment

Knex version: 0.16.5 Database + version: sqlite3@ OS: macos

Bug

  1. After moving to v0.16.6 when compiling my application with typescript I get the following error

  2. Generic type 'Knex<TRecord, TResult>' requires 2 type argument(s)

// client.ts
import knex from 'knex';

export default class Client {
  db: knex;
  constructor(db: knex) {
    this.db = db;
  }
}

I understand that the typescript definitions might not be your primary API. But https://github.com/tgriesser/knex/pull/3168 is probably causing ts-errors in any project that uses typescript and knex. And I therefore would consider it to be a breaking change.

I would really like to either see this change become optional or to have a migration guideline so that I can continue to use the lastest version of knex.

Thanks a lot for your work, also on #3168. Really appreciated!

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 30 (9 by maintainers)

Most upvoted comments

Thanks a lot for your patience and helping out with your feedback. 😃

@lorefnon is the hero here 😃

Yeah, there is a parallel ongoing effort to remove bluebird.

Final version of 0.17.0 is out.

0.17.0-next is now out. Suggestions, problem reproductions and PRs most welcome!

It wasn’t released yet, give me an hour or so 😃

Can you try 0.16.7?