0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-29 17:46:30 +01:00

fix(types): fix AddDollar (#1373)

This commit is contained in:
Yusuke Wada 2023-08-24 16:58:02 +09:00 committed by GitHub
parent 6400bbc14c
commit 1eb4a1dcdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -321,7 +321,7 @@ type ExtractKey<S> = S extends Record<infer Key, unknown>
export type ToSchema<M extends string, P extends string, I extends Input['in'], O> = {
[K in P]: {
[K2 in M as AddDollar<string & K2>]: {
[K2 in M as AddDollar<K2>]: {
input: unknown extends I ? AddParam<{}, P> : AddParam<I, P>
output: unknown extends O ? {} : O
}

View File

@ -321,7 +321,7 @@ type ExtractKey<S> = S extends Record<infer Key, unknown>
export type ToSchema<M extends string, P extends string, I extends Input['in'], O> = {
[K in P]: {
[K2 in M as AddDollar<string & K2>]: {
[K2 in M as AddDollar<K2>]: {
input: unknown extends I ? AddParam<{}, P> : AddParam<I, P>
output: unknown extends O ? {} : O
}