You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What runtime/platform is your app running on? (with version if possible)
Node.js
What steps can reproduce the bug?
I noticed two problems:
typia.http.createValidateQuery doesn’t work, it throws TypeError: xxx.get is not a function (in the most basic case, so reproduction is trivial). (My fault, I imported typiaValidator from @hono/typia-validator instead of @hono/typia-validator/http.)
Type 'MiddlewareHandler<E, P, { in: { [K in Target]: K extends "json" ? unknown : { [x: string]: ValidationTargets[K][string]; }; }; out: { [K_1 in Target]: any; }; }>' is not assignable to type 'MiddlewareHandler<E, P, V>'.
Types of parameters 'c' and 'c' are incompatible.
Type 'Context<E, P, V>' is not assignable to type 'Context<E, P, { in: { [K in Target]: K extends "json" ? unknown : { [x: string]: ValidationTargets[K][string]; }; }; out: { [K_1 in Target]: any; }; }>'.
Type 'V' is not assignable to type '{ in: { [K in Target]: K extends "json" ? unknown : { [x: string]: ValidationTargets[K][string]; }; }; out: { [K_1 in Target]: any; }; }'.
Type '{ in: { [K in Target]: O; }; out: { [K in Target]: O; }; }' is not assignable to type '{ in: { [K in Target]: K extends "json" ? unknown : { [x: string]: ValidationTargets[K][string]; }; }; out: { [K_1 in Target]: any; }; }'.
Types of property 'in' are incompatible.
Type '{ [K in Target]: O; }' is not assignable to type '{ [K in Target]: K extends "json" ? unknown : { [x: string]: ValidationTargets[K][string]; }; }'.
Type 'O' is not assignable to type 'K extends "json" ? unknown : { [x: string]: ValidationTargets[K][string]; }'.
Type 'OutputType<T>' is not assignable to type 'K extends "json" ? unknown : { [x: string]: ValidationTargets[K][string]; }'.
Type 'unknown' is not assignable to type 'K extends "json" ? unknown : { [x: string]: ValidationTargets[K][string]; }'.ts(2322)
And I cannot figure out how to fix it, this type is incredibly complex.
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
jirutka
changed the title
typia-validator is not compatible with hono 4.x
Types of typiaValidator in typia-validator are not compatible with hono 4.x
Jan 22, 2025
Which middleware has the bug?
@hono/typia-validator
What version of the middleware?
0.1.0
What version of Hono are you using?
4.6.17
What runtime/platform is your app running on? (with version if possible)
Node.js
What steps can reproduce the bug?
I noticed two problems:
(My fault, I importedtypia.http.createValidateQuery
doesn’t work, it throwsTypeError: xxx.get is not a function
(in the most basic case, so reproduction is trivial).typiaValidator
from@hono/typia-validator
instead of@hono/typia-validator/http
.)There’s a type error in packages/typia-validator/src/index.ts:32-51:
And I cannot figure out how to fix it, this type is incredibly complex.
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: