From 7221ddff5a9fd325e1690740d4e0f06c1fb9c101 Mon Sep 17 00:00:00 2001 From: Ilkka Laukkanen Date: Tue, 24 Jan 2017 10:59:37 +0200 Subject: [PATCH] Tweak type declaration to match JS API The request parameter to the constructor should be optional, and the scopes option should be an array, according to the JS docs. --- index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 96c7834..b0c26f7 100644 --- a/index.d.ts +++ b/index.d.ts @@ -5,7 +5,7 @@ declare class ClientOAuth2 { credentials: ClientOAuth2.CredentialsFlow; jwt: ClientOAuth2.JwtBearerFlow; - constructor(options: ClientOAuth2.Options, request: ClientOAuth2.Request); + constructor(options: ClientOAuth2.Options, request?: ClientOAuth2.Request); createToken(data: ClientOAuth2.Data): ClientOAuth2.Token; createToken(accessToken: string, data: ClientOAuth2.Data): ClientOAuth2.Token; @@ -24,7 +24,7 @@ declare namespace ClientOAuth2 { accessTokenUri?: string authorizationUri?: string redirectUri?: string - scopes?: string + scopes?: string[] state?: string body?: { [key: string]: string | string[];