mirror of
https://github.com/honojs/hono.git
synced 2024-11-25 05:07:03 +01:00
feat(jwt): make JwtVariables generic for improved type safety (#3428)
This commit is contained in:
parent
8130a67da1
commit
991a57bc00
@ -13,9 +13,9 @@ import '../../context'
|
|||||||
import type { SignatureAlgorithm } from '../../utils/jwt/jwa'
|
import type { SignatureAlgorithm } from '../../utils/jwt/jwa'
|
||||||
import type { SignatureKey } from '../../utils/jwt/jws'
|
import type { SignatureKey } from '../../utils/jwt/jws'
|
||||||
|
|
||||||
export type JwtVariables = {
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
export type JwtVariables<T = any> = {
|
||||||
jwtPayload: any
|
jwtPayload: T
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user