diff --git a/typings/mysql/lib/Connection.d.ts b/typings/mysql/lib/Connection.d.ts index 94527c5d9a..f6691f6485 100644 --- a/typings/mysql/lib/Connection.d.ts +++ b/typings/mysql/lib/Connection.d.ts @@ -258,6 +258,16 @@ export interface ConnectionOptions { */ rowsAsArray?: boolean; + /** + * Enable keep-alive on the socket. (Default: true) + */ + enableKeepAlive?: boolean; + + /** + * If keep-alive is enabled users can supply an initial delay. (Default: 0) + */ + keepAliveInitialDelay?: number; + charsetNumber?: number; compress?: boolean; @@ -312,10 +322,14 @@ declare class Connection extends QueryableBase(ExecutableBase(EventEmitter)) { | RowDataPacket[] | OkPacket | OkPacket[] - | ResultSetHeader + | ResultSetHeader, >( sql: string, - callback?: (err: QueryError | null, result: T, fields: FieldPacket[]) => any + callback?: ( + err: QueryError | null, + result: T, + fields: FieldPacket[], + ) => any, ): Query; static createQuery< T extends @@ -323,11 +337,15 @@ declare class Connection extends QueryableBase(ExecutableBase(EventEmitter)) { | RowDataPacket[] | OkPacket | OkPacket[] - | ResultSetHeader + | ResultSetHeader, >( sql: string, values: any | any[] | { [param: string]: any }, - callback?: (err: QueryError | null, result: T, fields: FieldPacket[]) => any + callback?: ( + err: QueryError | null, + result: T, + fields: FieldPacket[], + ) => any, ): Query; beginTransaction(callback: (err: QueryError | null) => void): void; @@ -338,7 +356,7 @@ declare class Connection extends QueryableBase(ExecutableBase(EventEmitter)) { changeUser( options: ConnectionOptions, - callback?: (err: QueryError | null) => void + callback?: (err: QueryError | null) => void, ): void; end(callback?: (err: QueryError | null) => void): void; @@ -363,7 +381,7 @@ declare class Connection extends QueryableBase(ExecutableBase(EventEmitter)) { prepare( sql: string, - callback?: (err: QueryError | null, statement: PrepareStatementInfo) => any + callback?: (err: QueryError | null, statement: PrepareStatementInfo) => any, ): Prepare; unprepare(sql: string): PrepareStatementInfo; diff --git a/typings/mysql/lib/Pool.d.ts b/typings/mysql/lib/Pool.d.ts index 93f8499561..90ed5e9bad 100644 --- a/typings/mysql/lib/Pool.d.ts +++ b/typings/mysql/lib/Pool.d.ts @@ -37,16 +37,6 @@ export interface PoolOptions extends ConnectionOptions { * is no limit to the number of queued connection requests. (Default: 0) */ queueLimit?: number; - - /** - * Enable keep-alive on the socket. (Default: true) - */ - enableKeepAlive?: boolean; - - /** - * If keep-alive is enabled users can supply an initial delay. (Default: 0) - */ - keepAliveInitialDelay?: number; } declare class Pool extends QueryableBase(ExecutableBase(EventEmitter)) {