From 6f1a0cb255cdd8af6340b14ea8013c272c33a6f5 Mon Sep 17 00:00:00 2001 From: JimiC Date: Mon, 10 Jul 2017 17:32:19 +0300 Subject: [PATCH 1/2] Inherit from Array for columns and rows. --- types/mssql/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/mssql/index.d.ts b/types/mssql/index.d.ts index 1200bacfd0..679324f0bd 100644 --- a/types/mssql/index.d.ts +++ b/types/mssql/index.d.ts @@ -214,13 +214,13 @@ export interface IColumn extends ISqlType { primary: boolean; } -declare class columns { +declare class columns extends Array { public add(name: string, type: (() => ISqlType) | ISqlType, options?: IColumnOptions): number; } type IRow = (string | number | boolean | Date | Buffer)[]; -declare class rows { +declare class rows extends Array { public add(...row: IRow): number; } From cf90deeaf716b9edcbac9bde3c8e7619d0852b1c Mon Sep 17 00:00:00 2001 From: JimiC Date: Fri, 14 Jul 2017 09:41:19 +0300 Subject: [PATCH 2/2] Include undefined as accepted type for IRow. --- types/mssql/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/mssql/index.d.ts b/types/mssql/index.d.ts index 679324f0bd..ed45eccf4d 100644 --- a/types/mssql/index.d.ts +++ b/types/mssql/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for mssql 4.0.4 +// 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: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -218,7 +218,7 @@ declare class columns extends Array { public add(name: string, type: (() => ISqlType) | ISqlType, options?: IColumnOptions): number; } -type IRow = (string | number | boolean | Date | Buffer)[]; +type IRow = (string | number | boolean | Date | Buffer | undefined)[]; declare class rows extends Array { public add(...row: IRow): number;