File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 11import {
22 Connection as PromiseConnection ,
3- Pool as PromisePool ,
43 PoolConnection as PromisePoolConnection ,
54} from './promise' ;
65
@@ -71,7 +70,6 @@ export interface Connection extends mysql.Connection {
7170 ) => any
7271 ) : mysql . Query ;
7372 ping ( callback ?: ( err : mysql . QueryError | null ) => any ) : void ;
74- promise ( promiseImpl ?: PromiseConstructor ) : PromiseConnection ;
7573 unprepare ( sql : string ) : mysql . PrepareStatementInfo ;
7674 prepare ( sql : string , callback ?: ( err : mysql . QueryError | null , statement : mysql . PrepareStatementInfo ) => any ) : mysql . Prepare ;
7775 serverHandshake ( args : any ) : any ;
@@ -157,7 +155,6 @@ export interface Pool extends mysql.Connection {
157155 on ( event : 'acquire' , listener : ( connection : PoolConnection ) => any ) : this;
158156 on ( event : 'release' , listener : ( connection : PoolConnection ) => any ) : this;
159157 on ( event : 'enqueue' , listener : ( ) => any ) : this;
160- promise ( promiseImpl ?: PromiseConstructor ) : PromisePool ;
161158 unprepare ( sql : string ) : mysql . PrepareStatementInfo ;
162159 prepare ( sql : string , callback ?: ( err : mysql . QueryError | null , statement : mysql . PrepareStatementInfo ) => any ) : mysql . Prepare ;
163160
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import BasePrepare = require('./lib/protocol/sequences/Prepare');
1212import { QueryOptions , StreamOptions , QueryError } from './lib/protocol/sequences/Query' ;
1313import { PrepareStatementInfo } from './lib/protocol/sequences/Prepare' ;
1414import Server = require( './lib/Server' ) ;
15+ import { Pool as PromisePool } from '../../promise' ;
1516
1617export function createConnection ( connectionUri : string ) : Connection ;
1718export function createConnection ( config : BaseConnection . ConnectionOptions ) : Connection ;
@@ -39,7 +40,9 @@ export {
3940export * from './lib/protocol/packets/index' ;
4041
4142// Expose class interfaces
42- export interface Connection extends BaseConnection { }
43+ export interface Connection extends BaseConnection {
44+ promise ( promiseImpl ?: PromiseConstructor ) : PromisePool ;
45+ }
4346export interface PoolConnection extends BasePoolConnection { }
4447export interface Pool extends BasePool { }
4548export interface PoolCluster extends BasePoolCluster { }
Original file line number Diff line number Diff line change @@ -290,8 +290,6 @@ declare class Connection extends EventEmitter {
290290 unprepare ( sql : string ) : any ;
291291
292292 serverHandshake ( args : any ) : any ;
293-
294- promise ( ) : Promise < Connection > ;
295293}
296294
297295export = Connection ;
You can’t perform that action at this time.
0 commit comments