@@ -80,16 +80,16 @@ export class Statement extends events.EventEmitter {
8080 run(params: any, callback?: (this: RunResult, err: Error | null) => void): this;
8181 run(...params: any[]): this;
8282
83- get(callback?: (err: Error | null, row?: any ) => void): this;
84- get(params: any, callback?: (this: RunResult, err: Error | null, row?: any ) => void): this;
83+ get<T> (callback?: (err: Error | null, row?: T ) => void): this;
84+ get<T> (params: any, callback?: (this: RunResult, err: Error | null, row?: T ) => void): this;
8585 get(...params: any[]): this;
8686
87- all(callback?: (err: Error | null, rows: any []) => void): this;
88- all(params: any, callback?: (this: RunResult, err: Error | null, rows: any []) => void): this;
87+ all<T> (callback?: (err: Error | null, rows: T []) => void): this;
88+ all<T> (params: any, callback?: (this: RunResult, err: Error | null, rows: T []) => void): this;
8989 all(...params: any[]): this;
9090
91- each(callback?: (err: Error | null, row: any ) => void, complete?: (err: Error | null, count: number) => void): this;
92- each(params: any, callback?: (this: RunResult, err: Error | null, row: any ) => void, complete?: (err: Error | null, count: number) => void): this;
91+ each<T> (callback?: (err: Error | null, row: T ) => void, complete?: (err: Error | null, count: number) => void): this;
92+ each<T> (params: any, callback?: (this: RunResult, err: Error | null, row: T ) => void, complete?: (err: Error | null, count: number) => void): this;
9393 each(...params: any[]): this;
9494}
9595
@@ -103,16 +103,16 @@ export class Database extends events.EventEmitter {
103103 run(sql: string, params: any, callback?: (this: RunResult, err: Error | null) => void): this;
104104 run(sql: string, ...params: any[]): this;
105105
106- get(sql: string, callback?: (this: Statement, err: Error | null, row: any ) => void): this;
107- get(sql: string, params: any, callback?: (this: Statement, err: Error | null, row: any ) => void): this;
106+ get<T> (sql: string, callback?: (this: Statement, err: Error | null, row: T ) => void): this;
107+ get<T> (sql: string, params: any, callback?: (this: Statement, err: Error | null, row: T ) => void): this;
108108 get(sql: string, ...params: any[]): this;
109109
110- all(sql: string, callback?: (this: Statement, err: Error | null, rows: any []) => void): this;
111- all(sql: string, params: any, callback?: (this: Statement, err: Error | null, rows: any []) => void): this;
110+ all<T> (sql: string, callback?: (this: Statement, err: Error | null, rows: T []) => void): this;
111+ all<T> (sql: string, params: any, callback?: (this: Statement, err: Error | null, rows: T []) => void): this;
112112 all(sql: string, ...params: any[]): this;
113113
114- each(sql: string, callback?: (this: Statement, err: Error | null, row: any ) => void, complete?: (err: Error | null, count: number) => void): this;
115- each(sql: string, params: any, callback?: (this: Statement, err: Error | null, row: any ) => void, complete?: (err: Error | null, count: number) => void): this;
114+ each<T> (sql: string, callback?: (this: Statement, err: Error | null, row: T ) => void, complete?: (err: Error | null, count: number) => void): this;
115+ each<T> (sql: string, params: any, callback?: (this: Statement, err: Error | null, row: T ) => void, complete?: (err: Error | null, count: number) => void): this;
116116 each(sql: string, ...params: any[]): this;
117117
118118 exec(sql: string, callback?: (this: Statement, err: Error | null) => void): this;
0 commit comments