@types/mysql
Advanced tools
Comparing version 2.15.16 to 2.15.17
@@ -15,2 +15,3 @@ // Type definitions for mysql 2.15 | ||
import tls = require('tls'); | ||
import events = require('events'); | ||
@@ -89,3 +90,3 @@ export interface EscapeFunctions { | ||
export interface Connection extends EscapeFunctions { | ||
export interface Connection extends EscapeFunctions, events.EventEmitter { | ||
config: ConnectionConfig; | ||
@@ -148,28 +149,2 @@ | ||
resume(): void; | ||
on(ev: 'drain' | 'connect', callback: () => void): Connection; | ||
/** | ||
* Set handler to be run when the connection is closed. | ||
*/ | ||
on(ev: 'end', callback: (err?: MysqlError) => void): Connection; | ||
on(ev: 'fields', callback: (fields: any[]) => void): Connection; | ||
/** | ||
* Set handler to be run when a a fatal error occurs. | ||
*/ | ||
on(ev: 'error', callback: (err: MysqlError) => void): Connection; | ||
/** | ||
* Set handler to be run when a callback has been queued to wait for an | ||
* available connection. | ||
*/ | ||
// tslint:disable-next-line:unified-signatures | ||
on(ev: 'enqueue', callback: (err?: MysqlError) => void): Connection; | ||
/** | ||
* Set handler to be run on a certain event. | ||
*/ | ||
on(ev: string, callback: (...args: any[]) => void): Connection; | ||
} | ||
@@ -194,3 +169,3 @@ | ||
export interface Pool extends EscapeFunctions { | ||
export interface Pool extends EscapeFunctions, events.EventEmitter { | ||
config: PoolActualConfig; | ||
@@ -213,44 +188,5 @@ | ||
query: QueryFunction; | ||
/** | ||
* Set handler to be run when a new connection is made within the pool. | ||
*/ | ||
on(ev: 'connection', callback: (connection: PoolConnection) => void): Pool; | ||
/** | ||
* Set handler to be run when a connection is acquired from the pool. This | ||
* is called after all acquiring activity has been performed on the | ||
* connection, right before the connection is handed to the callback of the | ||
* acquiring code. | ||
*/ | ||
// tslint:disable-next-line:unified-signatures | ||
on(ev: 'acquire', callback: (connection: PoolConnection) => void): Pool; | ||
/** | ||
* Set handler to be run when a connection is released back to the pool. | ||
* This is called after all release activity has been performed on the | ||
* connection, so the connection will be listed as free at the time of the | ||
* event. | ||
*/ | ||
// tslint:disable-next-line:unified-signatures | ||
on(ev: 'release', callback: (connection: PoolConnection) => void): Pool; | ||
/** | ||
* Set handler to be run when a a fatal error occurs. | ||
*/ | ||
on(ev: 'error', callback: (err: MysqlError) => void): Pool; | ||
/** | ||
* Set handler to be run when a callback has been queued to wait for an | ||
* available connection. | ||
*/ | ||
on(ev: 'enqueue', callback: (err?: MysqlError) => void): Pool; | ||
/** | ||
* Set handler to be run on a certain event. | ||
*/ | ||
on(ev: string, callback: (...args: any[]) => void): Pool; | ||
} | ||
export interface PoolCluster { | ||
export interface PoolCluster extends events.EventEmitter { | ||
config: PoolClusterConfig; | ||
@@ -286,12 +222,2 @@ | ||
): void; | ||
/** | ||
* Set handler to be run on a certain event. | ||
*/ | ||
on(ev: string, callback: (...args: any[]) => void): PoolCluster; | ||
/** | ||
* Set handler to be run when a node is removed or goes offline. | ||
*/ | ||
on(ev: 'remove' | 'offline', callback: (nodeId: string) => void): PoolCluster; | ||
} | ||
@@ -298,0 +224,0 @@ |
{ | ||
"name": "@types/mysql", | ||
"version": "2.15.16", | ||
"version": "2.15.17", | ||
"description": "TypeScript definitions for mysql", | ||
@@ -44,4 +44,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "1f8cfc68750505d54284403a807be30d0dd40754c17cda5063afc6abfbe2a501", | ||
"typesPublisherContentHash": "3d288a7bfcf25b1cd4ff1b2a15eac645f1d78c192b4372b28123ca0ffc55dc3d", | ||
"typeScriptVersion": "3.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Thu, 03 Dec 2020 00:14:54 GMT | ||
* Last updated: Tue, 29 Dec 2020 09:54:17 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25480
575