Skip to content

Commit

Permalink
Gracefully handle global promise pollution
Browse files Browse the repository at this point in the history
- Update QueryInterface type to be explicit about the methods being
  proxied

This primarily handles pollution of global Promise type by other
libraries which can break Knex typings.

Resolves: #3422 (comment)
  • Loading branch information
lorefnon committed Oct 29, 2019
1 parent d806ec0 commit e9fd66e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/index.d.ts
Expand Up @@ -1401,7 +1401,7 @@ declare namespace Knex {
// Chainable interface
//

interface ChainableInterface<T = any> extends Promise<T> {
interface ChainableInterface<T = any> extends Pick<Promise<T>, "then" | "catch" | "finally"> {
toQuery(): string;
options(options: { [key: string]: any }): this;
connection(connection: any): this;
Expand Down

0 comments on commit e9fd66e

Please sign in to comment.