UNPKG
@yash112/jwt-library
Version:
latest (1.0.7)
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
Encode, Decode & Validate JSON Web Token (JWTs)
@yash112/jwt-library
/
dist
/
jwt.d.ts
10 lines
(9 loc)
•
287 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
export
interface
JWTPayload
{
id
:
string
|
number
;
exp
?:
number
; [
key
:
string
]:
any
; }
export
declare
function
sign
(
payload
:
JWTPayload
,
secret
:
string
,
options
: { expiresIn?:
number
; }
):
string
;
export
declare
function
verify
(
token
:
string
,
secret
:
string
):
JWTPayload
;