From 5172762f69853c34755aa3734cd23d78e9fd3412 Mon Sep 17 00:00:00 2001 From: David Gasperoni Date: Mon, 25 Jun 2018 12:49:43 +0200 Subject: [PATCH 1/2] Specific declarations in PreparedStatement>execute The execute methods of PreparedStatement object lacked the specific return types. Before they simply returned void, now the adhere to the IProcedureResult interface. --- types/mssql/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/mssql/index.d.ts b/types/mssql/index.d.ts index 272abb5e39..5910cd2b00 100644 --- a/types/mssql/index.d.ts +++ b/types/mssql/index.d.ts @@ -311,8 +311,10 @@ export declare class PreparedStatement extends events.EventEmitter { public output(name: string, type: (() => ISqlType) | ISqlType): PreparedStatement; public prepare(statement?: string): Promise; public prepare(statement?: string, callback?: (err?: Error) => void): PreparedStatement; - public execute(values: Object): Promise; - public execute(values: Object, callback: (err?: Error) => void): Request; + public execute(values: Object): Promise>; + public execute(values: Object): Promise>; + public execute(values: Object, callback: (err?: Error, result?: IProcedureResult) => void): Request; + public execute(values: Object, callback: (err?: Error, result?: IProcedureResult) => void): Request; public unprepare(): Promise; public unprepare(callback: (err?: Error) => void): PreparedStatement; } From 93f9c528171ce61639f44af2cf9ab44978c4f966 Mon Sep 17 00:00:00 2001 From: David Gasperoni Date: Mon, 25 Jun 2018 13:03:08 +0200 Subject: [PATCH 2/2] Add contributor to definitions authors --- types/mssql/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/types/mssql/index.d.ts b/types/mssql/index.d.ts index 5910cd2b00..109a515515 100644 --- a/types/mssql/index.d.ts +++ b/types/mssql/index.d.ts @@ -1,6 +1,12 @@ // Type definitions for mssql 4.0.5 // Project: https://www.npmjs.com/package/mssql -// Definitions by: COLSA Corporation , Ben Farr , Vitor Buzinaro , Matt Richardson , Jørgen Elgaard Larsen , Peter Keuter +// Definitions by: COLSA Corporation +// Ben Farr +// Vitor Buzinaro +// Matt Richardson +// Jørgen Elgaard Larsen +// Peter Keuter +// David Gasperoni // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped ///