diff --git a/index.d.ts b/index.d.ts index 7976adf740..716e5d161b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,6 +1,5 @@ import { Connection as PromiseConnection, - Pool as PromisePool, PoolConnection as PromisePoolConnection, } from './promise'; @@ -71,7 +70,6 @@ export interface Connection extends mysql.Connection { ) => any ): mysql.Query; ping(callback?: (err: mysql.QueryError | null) => any): void; - promise(promiseImpl?: PromiseConstructor): PromiseConnection; unprepare(sql: string): mysql.PrepareStatementInfo; prepare(sql: string, callback?: (err: mysql.QueryError | null, statement: mysql.PrepareStatementInfo) => any): mysql.Prepare; serverHandshake(args: any): any; @@ -157,7 +155,6 @@ export interface Pool extends mysql.Connection { on(event: 'acquire', listener: (connection: PoolConnection) => any): this; on(event: 'release', listener: (connection: PoolConnection) => any): this; on(event: 'enqueue', listener: () => any): this; - promise(promiseImpl?: PromiseConstructor): PromisePool; unprepare(sql: string): mysql.PrepareStatementInfo; prepare(sql: string, callback?: (err: mysql.QueryError | null, statement: mysql.PrepareStatementInfo) => any): mysql.Prepare; diff --git a/typings/mysql/index.d.ts b/typings/mysql/index.d.ts index b587262467..c25edb89f9 100644 --- a/typings/mysql/index.d.ts +++ b/typings/mysql/index.d.ts @@ -12,6 +12,7 @@ import BasePrepare = require('./lib/protocol/sequences/Prepare'); import {QueryOptions, StreamOptions, QueryError} from './lib/protocol/sequences/Query'; import {PrepareStatementInfo} from './lib/protocol/sequences/Prepare'; import Server = require('./lib/Server'); +import { Pool as PromisePool } from '../../promise'; export function createConnection(connectionUri: string): Connection; export function createConnection(config: BaseConnection.ConnectionOptions): Connection; @@ -39,7 +40,9 @@ export { export * from './lib/protocol/packets/index'; // Expose class interfaces -export interface Connection extends BaseConnection {} +export interface Connection extends BaseConnection { + promise(promiseImpl?: PromiseConstructor): PromisePool; +} export interface PoolConnection extends BasePoolConnection {} export interface Pool extends BasePool {} export interface PoolCluster extends BasePoolCluster {} diff --git a/typings/mysql/lib/Connection.d.ts b/typings/mysql/lib/Connection.d.ts index 70f36811ed..08a51b4662 100644 --- a/typings/mysql/lib/Connection.d.ts +++ b/typings/mysql/lib/Connection.d.ts @@ -290,8 +290,6 @@ declare class Connection extends EventEmitter { unprepare(sql: string): any; serverHandshake(args: any): any; - - promise(): Promise; } export = Connection;