UNPKG

316 BTypeScriptView Raw
1export type TAlgorithm = 'HS256' | 'HS384' | 'HS512' | 'RS256';
2
3export interface IOptions {
4 header: any;
5}
6
7export function decode(token: string, key: string, noVerify?: boolean, algorithm?: TAlgorithm): any;
8
9export function encode(payload: any, key: string, algorithm?: TAlgorithm, options?: IOptions): string;