|
1 | 1 | /** |
2 | 2 | * @template [T=any] Default is `any` |
3 | | - * @typedef {{ _?: string; $?: any; _type?: Record<keyof any, never> } |
| 3 | + * @typedef {{ _?: string; $?: any; _type?: { [K in keyof any]: never } } |
4 | 4 | * | { [K: string]: Query<T> }} Query |
5 | 5 | */ |
6 | 6 |
|
|
16 | 16 |
|
17 | 17 | /** |
18 | 18 | * @template {string} [TypeName=never] Default is `never` |
19 | | - * @template {Record<string, any>} [Extensions=Record<never, never>] Default is |
20 | | - * `Record<never, never>` |
| 19 | + * @template {{ [K: string]: any }} [Extensions={}] Default is `{}` |
21 | 20 | * @template [Context=unknown] Default is `unknown` |
22 | 21 | * @template [Input=unknown] Default is `unknown` |
23 | 22 | * @template [Object=unknown] Default is `unknown` |
|
53 | 52 | * object: Object; |
54 | 53 | * path: string[]; |
55 | 54 | * query: Query; |
56 | | - * schema: Schema; |
| 55 | + * schema: Schema<TypeName, Extensions, Context>; |
57 | 56 | * type: Type; |
58 | 57 | * value: Value; |
59 | 58 | * }) => any) |
|
70 | 69 | * object: Object; |
71 | 70 | * path: string[]; |
72 | 71 | * query: Query; |
73 | | - * schema: Schema; |
| 72 | + * schema: Schema<TypeName, Extensions, Context>; |
74 | 73 | * type: Type; |
75 | 74 | * value: Value; |
76 | 75 | * }) => number); |
|
81 | 80 | * object: Object; |
82 | 81 | * path: string[]; |
83 | 82 | * query: Query; |
84 | | - * schema: Schema; |
| 83 | + * schema: Schema<TypeName, Extensions, Context>; |
85 | 84 | * type: Type; |
86 | 85 | * value: ResolvedValue; |
87 | 86 | * }) => any; |
|
91 | 90 | */ |
92 | 91 |
|
93 | 92 | /** |
94 | | - * @template {string} [TypeName=never] Default is `never` |
95 | | - * @template {Record<string, any>} [Extensions=Record<never, never>] Default is |
96 | | - * `Record<never, never>` |
97 | | - * @template [Context=unknown] Default is `unknown` |
98 | | - * @typedef {Record< |
99 | | - * TypeName, |
100 | | - * Type<TypeName, Extensions, Context, any, any, any, any> |
101 | | - * >} Schema |
| 93 | + * @template {string} TypeName |
| 94 | + * @template {{ [K: string]: any }} Extensions |
| 95 | + * @template Context |
| 96 | + * @typedef {{ |
| 97 | + * [K in TypeName]: Type<TypeName, Extensions, Context, any, any, any, any>; |
| 98 | + * }} Schema |
102 | 99 | */ |
103 | 100 |
|
104 | 101 | export { Context } from '#src/context.js'; |
|
0 commit comments