Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
Connection as PromiseConnection,
Pool as PromisePool,
PoolConnection as PromisePoolConnection,
} from './promise';

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
5 changes: 4 additions & 1 deletion typings/mysql/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {}
Expand Down
2 changes: 0 additions & 2 deletions typings/mysql/lib/Connection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,6 @@ declare class Connection extends EventEmitter {
unprepare(sql: string): any;

serverHandshake(args: any): any;

promise(): Promise<Connection>;
}

export = Connection;