From 6ed5c800004cd6a5275056e137dcbb13a683edee Mon Sep 17 00:00:00 2001 From: Ke Zhang Date: Tue, 27 Mar 2018 21:06:48 -0700 Subject: [PATCH] Add proper type for AccessToken.token. --- types/simple-oauth2/index.d.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/types/simple-oauth2/index.d.ts b/types/simple-oauth2/index.d.ts index 499f39e56e..c1eb324348 100644 --- a/types/simple-oauth2/index.d.ts +++ b/types/simple-oauth2/index.d.ts @@ -44,8 +44,12 @@ export interface ModuleOptions { export type TokenType = "access_token" | "refresh_token"; +export interface Token { + [x: string]: any; +} + export interface AccessToken { - token: {}; + token: Token; /** Check if the access token is expired or not */ expired(): boolean; @@ -56,9 +60,6 @@ export interface AccessToken { revoke(tokenType: TokenType, callback?: (error: any) => void): Bluebird; } -export interface Token { - [x: string]: any; -} export type AuthorizationCode = string; export interface AuthorizationTokenConfig { code: AuthorizationCode;