From 991a57bc00cef4096a7a3b78d687440f826b41d9 Mon Sep 17 00:00:00 2001 From: TinsFox Date: Tue, 24 Sep 2024 11:03:44 +0800 Subject: [PATCH] feat(jwt): make JwtVariables generic for improved type safety (#3428) --- src/middleware/jwt/jwt.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/middleware/jwt/jwt.ts b/src/middleware/jwt/jwt.ts index 99355fd6..aea1298f 100644 --- a/src/middleware/jwt/jwt.ts +++ b/src/middleware/jwt/jwt.ts @@ -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 = { + jwtPayload: T } /**