From e9fd66e2d2f5525bbaa6c5fe5b55a1a4bf98def1 Mon Sep 17 00:00:00 2001 From: Lorefnon Date: Tue, 29 Oct 2019 08:21:27 +0530 Subject: [PATCH] Gracefully handle global promise pollution - 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: https://github.com/knex/knex/issues/3422#issuecomment-546930375 --- types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 49245ffd40..68bc2e3cd0 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1401,7 +1401,7 @@ declare namespace Knex { // Chainable interface // - interface ChainableInterface extends Promise { + interface ChainableInterface extends Pick, "then" | "catch" | "finally"> { toQuery(): string; options(options: { [key: string]: any }): this; connection(connection: any): this;