knex: Property 'timeout' does not exist on type 'QueryBuilder'

Environment

Knex version: 0.19.3 Database + version: MySQL 5.7.22 OS: 10.14.6

If issue is about TypeScript definitions, tag @lorefnon.

Bug

  1. Explain what kind of behaviour you are getting and how you think it should do

    I’m using Typescript Version 3.5.1. When I upgrade knex version from 0.17.3 to 0.19.3, I got a compile error regarding timeout. It worked well before. 🙃

  2. Error message

    Property 'timeout' does not exist on type 'QueryBuilder<unknown, 
    DeferredKeySelection<unknown, never, false, {}, false, {}, never>[]>'
    

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Released in 0.20.1

Same issue with the map - property. It works with 0.17.6 knex but breaks with 0.18.0 and newer.

Property 'map' does not exist on type 'QueryBuilder<unknown, (DeferredKeySelection<unknown, string, true, {}, boolean, {}, unknown> | DeferredKeySelection<unknown, "id", true, {}, false, {}, never>)[]>'

@yigaldviri Right, so that forces all calls to new Promise to actually instantiate a Bluebird promise? Other than casting Knex native promises to Bluebird promises, I don’t think there is a possible solution for existing version; however, we are definitely going to look into at least addresing the .timeout use-case.