From 23c358593ea27667bb56d31503e33822828b7ca5 Mon Sep 17 00:00:00 2001 From: Max Chehab Date: Wed, 5 Jun 2019 14:10:12 -0400 Subject: [PATCH] @types/airtable Added constructor definition. (#35957) * Added constructor definition. * Added constructor definition. * Added constructor parameter definition as `AirtableOptions`. * Update index.d.ts add `requestTimeout: number` to `AirtableOptions`. --- types/airtable/index.d.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/types/airtable/index.d.ts b/types/airtable/index.d.ts index f3b6efa4ee..797c8d36e5 100644 --- a/types/airtable/index.d.ts +++ b/types/airtable/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for airtable 0.5 // Project: https://github.com/airtable/airtable.js // Definitions by: Brandon Valosek +// Max Chehab // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -8,12 +9,22 @@ export = Airtable; declare global { class Airtable { + constructor(options?: Airtable.AirtableOptions); base(appId: string): Airtable.Base; } namespace Airtable { interface FieldSet { - [ key: string ]: undefined | string | ReadonlyArray; + [key: string]: undefined | string | ReadonlyArray; + } + + interface AirtableOptions { + apiKey?: string; + endpointUrl?: string; + apiVersion?: string; + allowUnauthorizedSsl?: boolean; + noRetryIfRateLimited?: boolean; + requestTimeout: number; } interface Base {