TokenAdapter
Type parameters
Type parameter | Value |
---|---|
T extends TokenTypes | TokenTypes |
K extends boolean | T extends "code" | "app" ? true : never |
Constructors
new TokenAdapter()
Parameters
Parameter | Type |
---|---|
options | TokenAdapterOptions <T , K > |
Returns
TokenAdapter
<T
, K
>
Source
twitchfy/packages/helix/dist/structures/TokenAdapter.d.ts:7
Properties
Property | Type |
---|---|
refresh | T extends "app" | "code" ? K : never |
refreshToken | T extends "code" ? K extends true ? string : never : never |
token | string |
type | T |
Methods
isAppToken()
Returns
boolean
Source
twitchfy/packages/helix/dist/structures/TokenAdapter.d.ts:11
isUserToken()
Returns
boolean
Source
twitchfy/packages/helix/dist/structures/TokenAdapter.d.ts:10
setRefreshToken()
Parameters
Parameter | Type |
---|---|
refreshToken | string |
Returns
this
Source
twitchfy/packages/helix/dist/structures/TokenAdapter.d.ts:9
setToken()
Parameters
Parameter | Type |
---|---|
token | string |
Returns
this
Source
twitchfy/packages/helix/dist/structures/TokenAdapter.d.ts:8