Add proper type for AccessToken.token.

This commit is contained in:
Ke Zhang
2018-03-27 21:06:48 -07:00
committed by GitHub
parent b27c13d93a
commit 6ed5c80000

View File

@@ -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<void>;
}
export interface Token {
[x: string]: any;
}
export type AuthorizationCode = string;
export interface AuthorizationTokenConfig {
code: AuthorizationCode;