mirror of
https://github.com/knex/knex.git
synced 2025-12-29 07:59:31 +00:00
Gracefully handle global promise pollution (#3502)
Update QueryInterface to proxy to only standard promise methods Update QueryInterface type to be explicit about the methods being proxied This primarily handles pollution of global Promise (either the type or the global object at runtime) by other libraries. Fixes: #3422
This commit is contained in:
parent
0560959fa4
commit
6f5a13d3ab
2
types/index.d.ts
vendored
2
types/index.d.ts
vendored
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user