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 1
1
import {
2
2
Connection as PromiseConnection ,
3
- Pool as PromisePool ,
4
3
PoolConnection as PromisePoolConnection ,
5
4
} from './promise' ;
6
5
@@ -71,7 +70,6 @@ export interface Connection extends mysql.Connection {
71
70
) => any
72
71
) : mysql . Query ;
73
72
ping ( callback ?: ( err : mysql . QueryError | null ) => any ) : void ;
74
- promise ( promiseImpl ?: PromiseConstructor ) : PromiseConnection ;
75
73
unprepare ( sql : string ) : mysql . PrepareStatementInfo ;
76
74
prepare ( sql : string , callback ?: ( err : mysql . QueryError | null , statement : mysql . PrepareStatementInfo ) => any ) : mysql . Prepare ;
77
75
serverHandshake ( args : any ) : any ;
@@ -157,7 +155,6 @@ export interface Pool extends mysql.Connection {
157
155
on ( event : 'acquire' , listener : ( connection : PoolConnection ) => any ) : this;
158
156
on ( event : 'release' , listener : ( connection : PoolConnection ) => any ) : this;
159
157
on ( event : 'enqueue' , listener : ( ) => any ) : this;
160
- promise ( promiseImpl ?: PromiseConstructor ) : PromisePool ;
161
158
unprepare ( sql : string ) : mysql . PrepareStatementInfo ;
162
159
prepare ( sql : string , callback ?: ( err : mysql . QueryError | null , statement : mysql . PrepareStatementInfo ) => any ) : mysql . Prepare ;
163
160
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import BasePrepare = require('./lib/protocol/sequences/Prepare');
12
12
import { QueryOptions , StreamOptions , QueryError } from './lib/protocol/sequences/Query' ;
13
13
import { PrepareStatementInfo } from './lib/protocol/sequences/Prepare' ;
14
14
import Server = require( './lib/Server' ) ;
15
+ import { Pool as PromisePool } from '../../promise' ;
15
16
16
17
export function createConnection ( connectionUri : string ) : Connection ;
17
18
export function createConnection ( config : BaseConnection . ConnectionOptions ) : Connection ;
@@ -39,7 +40,9 @@ export {
39
40
export * from './lib/protocol/packets/index' ;
40
41
41
42
// Expose class interfaces
42
- export interface Connection extends BaseConnection { }
43
+ export interface Connection extends BaseConnection {
44
+ promise ( promiseImpl ?: PromiseConstructor ) : PromisePool ;
45
+ }
43
46
export interface PoolConnection extends BasePoolConnection { }
44
47
export interface Pool extends BasePool { }
45
48
export interface PoolCluster extends BasePoolCluster { }
Original file line number Diff line number Diff line change @@ -290,8 +290,6 @@ declare class Connection extends EventEmitter {
290
290
unprepare ( sql : string ) : any ;
291
291
292
292
serverHandshake ( args : any ) : any ;
293
-
294
- promise ( ) : Promise < Connection > ;
295
293
}
296
294
297
295
export = Connection ;
You can’t perform that action at this time.
0 commit comments