1
0

Fix typing to make build work

This commit is contained in:
Richard Lee
2024-01-08 01:01:32 +08:00
committed by Toby
parent b0d4084a0f
commit 55bc15bec4

View File

@@ -220,7 +220,7 @@ export async function sign<Payload = {}, Header = {}>(payload: JwtPayload<Payloa
if (typeof options === 'string')
options = { algorithm: options }
options = { algorithm: 'HS256', header: { typ: 'JWT' }, ...options }
options = { algorithm: 'HS256', header: { typ: 'JWT' } as JwtHeader<Header>, ...options }
if (!payload || typeof payload !== 'object')
throw new Error('payload must be an object')