0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-21 18:18:57 +01:00

feat(jwt): make JwtVariables generic for improved type safety (#3428)

This commit is contained in:
TinsFox 2024-09-24 11:03:44 +08:00 committed by GitHub
parent 8130a67da1
commit 991a57bc00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,9 +13,9 @@ import '../../context'
import type { SignatureAlgorithm } from '../../utils/jwt/jwa'
import type { SignatureKey } from '../../utils/jwt/jws'
export type JwtVariables = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
jwtPayload: any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type JwtVariables<T = any> = {
jwtPayload: T
}
/**