Skip to content

Commit 534ba35

Browse files
authored
Merge pull request #1340 from yarsky-tgz/master
Added missing type declarations
2 parents 943b8b2 + 384e993 commit 534ba35

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

typings/mysql/index.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ export function createConnection(config: BaseConnection.ConnectionOptions): Conn
1414
export function createPool(config: BasePool.PoolOptions): Pool;
1515
export function createPoolCluster(config?: BasePoolCluster.PoolClusterOptions): PoolCluster;
1616
export function escape(value: any): string;
17+
export function escapeId(value: any): string;
1718
export function format(sql: string): string;
18-
export function format(sql: string, values: any[]): string;
19-
export function format(sql: string, values: any): string;
19+
export function format(sql: string, values: any[], stringifyObjects?: boolean, timeZone?: string): string;
20+
export function format(sql: string, values: any, stringifyObjects?: boolean, timeZone?: string): string;
21+
export function raw(sql: string): {
22+
toSqlString: () => string
23+
};
2024

2125
export {
2226
ConnectionOptions,

typings/mysql/lib/Connection.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ declare class Connection extends EventEmitter {
269269

270270
on(event: string, listener: Function): this;
271271

272-
rollback(callback: () => void): void;
272+
rollback(callback: (err: Query.QueryError | null) => void): void;
273273
}
274274

275275
export = Connection;

typings/mysql/lib/protocol/sequences/Query.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ declare class Query extends Sequence {
136136
*
137137
* @param options The options for the stream.
138138
*/
139-
stream(options: Query.StreamOptions): Readable;
139+
stream(options?: Query.StreamOptions): Readable;
140140

141141
on(event: string, listener: Function): this;
142142
on(event: 'error', listener: (err: Query.QueryError) => any): this;

0 commit comments

Comments
 (0)