mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 14:59:37 +08:00
Merge pull request #24579 from plutino/master
[@types/simple-oauth2] Set proper type for AccessToken.token.
This commit is contained in:
11
types/simple-oauth2/index.d.ts
vendored
11
types/simple-oauth2/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for simple-oauth2 1.0
|
||||
// Type definitions for simple-oauth2 1.1
|
||||
// Project: https://github.com/lelylan/simple-oauth2
|
||||
// Definitions by: [Michael Müller] <https://github.com/mad-mike>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user