evikit 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/db.d.ts +268 -255
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/sqlite.js +591 -576
package/README.md
CHANGED
|
@@ -218,7 +218,7 @@ export function api() {
|
|
|
218
218
|
|
|
219
219
|
#### Page router
|
|
220
220
|
|
|
221
|
-
Add a Preact router at `src/
|
|
221
|
+
Add a Preact router at `src/prerender.js` (uncomment the routes one-by-one when we add them later):
|
|
222
222
|
|
|
223
223
|
```js
|
|
224
224
|
import { route, ssr } from "evikit";
|
|
@@ -252,7 +252,7 @@ Make an HTML template `index.html`, leaving placeholders for server-rendered con
|
|
|
252
252
|
</head>
|
|
253
253
|
<body>
|
|
254
254
|
<div id="app"><!--app-html--></div>
|
|
255
|
-
<script prerender type="module" src="/src/
|
|
255
|
+
<script prerender type="module" src="/src/prerender.js"></script>
|
|
256
256
|
</body>
|
|
257
257
|
</html>
|
|
258
258
|
```
|
|
@@ -308,7 +308,7 @@ import { readFile } from "node:fs/promises";
|
|
|
308
308
|
import swaggerUi from "swagger-ui-express";
|
|
309
309
|
|
|
310
310
|
import { api } from "./src/api.js";
|
|
311
|
-
import { prerender } from "./src/
|
|
311
|
+
import { prerender } from "./src/prerender.js";
|
|
312
312
|
|
|
313
313
|
const app = express();
|
|
314
314
|
app.use(api().onRequest);
|
|
@@ -433,7 +433,7 @@ export function HomePage() {
|
|
|
433
433
|
}
|
|
434
434
|
```
|
|
435
435
|
|
|
436
|
-
Uncomment the `HomePage` import and `/` route in `src/
|
|
436
|
+
Uncomment the `HomePage` import and `/` route in `src/prerender.js`.
|
|
437
437
|
|
|
438
438
|
#### Forms
|
|
439
439
|
|
|
@@ -524,7 +524,7 @@ export function QuestionIdPage() {
|
|
|
524
524
|
}
|
|
525
525
|
```
|
|
526
526
|
|
|
527
|
-
Uncomment the `QuestionIdPage` import and `/question/:id` route in `src/
|
|
527
|
+
Uncomment the `QuestionIdPage` import and `/question/:id` route in `src/prerender.js`.
|
|
528
528
|
|
|
529
529
|
##### Suggest own option
|
|
530
530
|
|
|
@@ -789,8 +789,9 @@ import { ok } from "node:assert/strict";
|
|
|
789
789
|
|
|
790
790
|
// ...
|
|
791
791
|
|
|
792
|
-
const
|
|
792
|
+
const [question] = db.Question.select({
|
|
793
793
|
with: { Choice: { with: { iconStorage: true } } },
|
|
794
|
+
where: { id: input.id },
|
|
794
795
|
});
|
|
795
796
|
|
|
796
797
|
// ...
|
package/db.d.ts
CHANGED
|
@@ -1,255 +1,268 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
InferInput,
|
|
3
|
-
InferMetadata,
|
|
4
|
-
InferOutput,
|
|
5
|
-
MetadataAction,
|
|
6
|
-
ObjectSchema,
|
|
7
|
-
} from "valibot";
|
|
8
|
-
|
|
9
|
-
export type Db<
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
-
Schema extends Record<string, ObjectSchema<any, any>>,
|
|
12
|
-
R extends Relations<Schema> = Relations<Schema>,
|
|
13
|
-
F extends Flatten<Schema> = Flatten<Schema>,
|
|
14
|
-
> = {
|
|
15
|
-
[Table in keyof R]: Table extends keyof F & keyof Schema & string
|
|
16
|
-
? {
|
|
17
|
-
delete(where: Where<Schema, Table>): void;
|
|
18
|
-
|
|
19
|
-
select<
|
|
20
|
-
W extends Partial<Join<R, Table>> & {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
[
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
> =
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
type
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
1
|
+
import type {
|
|
2
|
+
InferInput,
|
|
3
|
+
InferMetadata,
|
|
4
|
+
InferOutput,
|
|
5
|
+
MetadataAction,
|
|
6
|
+
ObjectSchema,
|
|
7
|
+
} from "valibot";
|
|
8
|
+
|
|
9
|
+
export type Db<
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
Schema extends Record<string, ObjectSchema<any, any>>,
|
|
12
|
+
R extends Relations<Schema> = Relations<Schema>,
|
|
13
|
+
F extends Flatten<Schema> = Flatten<Schema>,
|
|
14
|
+
> = {
|
|
15
|
+
[Table in keyof R]: Table extends keyof F & keyof Schema & string
|
|
16
|
+
? {
|
|
17
|
+
delete(where: Where<Schema, Table>): void;
|
|
18
|
+
|
|
19
|
+
select<
|
|
20
|
+
W extends Partial<Join<R, Table>> & {
|
|
21
|
+
limit?: number;
|
|
22
|
+
offset?: number;
|
|
23
|
+
order?: Order<Schema, Table>;
|
|
24
|
+
where?: Where<Schema, Table>;
|
|
25
|
+
},
|
|
26
|
+
>(
|
|
27
|
+
props?: W,
|
|
28
|
+
): Select<Schema, R, F, Table, W>[];
|
|
29
|
+
|
|
30
|
+
update(query: {
|
|
31
|
+
set: Partial<InferOutput<Schema[Table]>>;
|
|
32
|
+
where: Where<Schema, Table>;
|
|
33
|
+
}): void;
|
|
34
|
+
|
|
35
|
+
upsert(
|
|
36
|
+
...values: InferInput<Schema[Table]>[]
|
|
37
|
+
): InferOutput<Schema[Table]>[];
|
|
38
|
+
}
|
|
39
|
+
: never;
|
|
40
|
+
} & {
|
|
41
|
+
schema: Schema;
|
|
42
|
+
subscribe(onMessage: ({ table }: { table: string }) => void): () => void;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type Flatten<
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47
|
+
Schema extends Record<string, ObjectSchema<any, any>>,
|
|
48
|
+
R extends Relations<Schema> = Relations<Schema>,
|
|
49
|
+
> = {
|
|
50
|
+
[Self in keyof R]: Self extends string
|
|
51
|
+
? UnionToIntersection<
|
|
52
|
+
{
|
|
53
|
+
[Own in keyof R[Self]]: Own extends string
|
|
54
|
+
? {
|
|
55
|
+
[Other in keyof R[Self][Own]]: Other extends string
|
|
56
|
+
? R[Self][Own][Other] extends Record<string, { name: string }>
|
|
57
|
+
? {
|
|
58
|
+
[
|
|
59
|
+
Its in keyof R[Self][Own][Other] as R[Self][Own][Other][Its]["name"]
|
|
60
|
+
]: Its extends string
|
|
61
|
+
? R[Self][Own][Other][Its]
|
|
62
|
+
: never;
|
|
63
|
+
}
|
|
64
|
+
: never
|
|
65
|
+
: never;
|
|
66
|
+
}[keyof R[Self][Own]]
|
|
67
|
+
: never;
|
|
68
|
+
}[keyof R[Self]]
|
|
69
|
+
>
|
|
70
|
+
: never;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export type Join<Relations, Self extends keyof Relations> = UnionToIntersection<
|
|
74
|
+
{
|
|
75
|
+
[Own in keyof Relations[Self]]: Own extends string
|
|
76
|
+
? {
|
|
77
|
+
[Other in keyof Relations[Self][Own]]: Other extends keyof Relations
|
|
78
|
+
? {
|
|
79
|
+
[Its in keyof Relations[Self][Own][Other]]: Its extends string
|
|
80
|
+
? Relations[Self][Own][Other] extends Record<
|
|
81
|
+
string,
|
|
82
|
+
{ name: string }
|
|
83
|
+
>
|
|
84
|
+
? {
|
|
85
|
+
// Turning this into partial record would cause infinite depth.
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
|
|
87
|
+
with: {
|
|
88
|
+
[K in Relations[Self][Own][Other][Its]["name"]]?:
|
|
89
|
+
Join<Relations, Other> | true;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
: never
|
|
93
|
+
: never;
|
|
94
|
+
}[keyof Relations[Self][Own][Other]]
|
|
95
|
+
: never;
|
|
96
|
+
}[keyof Relations[Self][Own]]
|
|
97
|
+
: never;
|
|
98
|
+
}[keyof Relations[Self]]
|
|
99
|
+
>;
|
|
100
|
+
|
|
101
|
+
export type Order<
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
103
|
+
Schema extends Record<string, ObjectSchema<any, any>>,
|
|
104
|
+
Table extends keyof Schema,
|
|
105
|
+
> =
|
|
106
|
+
| { [K in keyof Schema[Table]["entries"]]?: null | { desc: true } }
|
|
107
|
+
| { [K in keyof Schema[Table]["entries"]]?: null | { desc: true } }[];
|
|
108
|
+
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
110
|
+
export type Relations<Schema extends Record<string, ObjectSchema<any, any>>> = {
|
|
111
|
+
[Self in keyof Schema]: Self extends string
|
|
112
|
+
? OmitExtendsRecordUndefined<{
|
|
113
|
+
[Own in keyof Schema[Self]["entries"]]: Own extends string
|
|
114
|
+
? OmitExtendsRecordUndefined<{
|
|
115
|
+
[Other in keyof Schema]: Other extends string
|
|
116
|
+
? OmitExtendsUndefined<{
|
|
117
|
+
[Its in keyof Schema[Other]["entries"]]: Its extends string
|
|
118
|
+
? InferMetadata<Schema[Self]["entries"][Own]> extends {
|
|
119
|
+
key: Schema[Other]["entries"][Its];
|
|
120
|
+
references: Schema[Other];
|
|
121
|
+
}
|
|
122
|
+
? Schema[Other] extends InferMetadata<
|
|
123
|
+
Schema[Self]["entries"][Own]
|
|
124
|
+
>["references"]
|
|
125
|
+
? Schema[Other]["entries"][Its] extends InferMetadata<
|
|
126
|
+
Schema[Self]["entries"][Own]
|
|
127
|
+
>["key"]
|
|
128
|
+
? {
|
|
129
|
+
Its: Its;
|
|
130
|
+
name: Rewrite<Self, Own, Other, Its>;
|
|
131
|
+
Other: Other;
|
|
132
|
+
Own: Own;
|
|
133
|
+
type: "references";
|
|
134
|
+
}
|
|
135
|
+
: undefined
|
|
136
|
+
: undefined
|
|
137
|
+
: InferMetadata<Schema[Other]["entries"][Its]> extends {
|
|
138
|
+
key: Schema[Self]["entries"][Own];
|
|
139
|
+
references: Schema[Self];
|
|
140
|
+
}
|
|
141
|
+
? Schema[Self] extends InferMetadata<
|
|
142
|
+
Schema[Other]["entries"][Its]
|
|
143
|
+
>["references"]
|
|
144
|
+
? Schema[Self]["entries"][Own] extends InferMetadata<
|
|
145
|
+
Schema[Other]["entries"][Its]
|
|
146
|
+
>["key"]
|
|
147
|
+
? {
|
|
148
|
+
Its: Its;
|
|
149
|
+
name: Rewrite<Self, Own, Other, Its>;
|
|
150
|
+
Other: Other;
|
|
151
|
+
Own: Own;
|
|
152
|
+
type: "referencedBy";
|
|
153
|
+
}
|
|
154
|
+
: undefined
|
|
155
|
+
: undefined
|
|
156
|
+
: undefined
|
|
157
|
+
: undefined;
|
|
158
|
+
}>
|
|
159
|
+
: undefined;
|
|
160
|
+
}>
|
|
161
|
+
: undefined;
|
|
162
|
+
}>
|
|
163
|
+
: undefined;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export type Where<
|
|
167
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
168
|
+
Schema extends Record<string, ObjectSchema<any, any>>,
|
|
169
|
+
Table extends keyof Schema,
|
|
170
|
+
> = {
|
|
171
|
+
[K in keyof Schema[Table]["entries"]]?:
|
|
172
|
+
| InferOutput<Schema[Table]["entries"][K]>
|
|
173
|
+
| InferOutput<Schema[Table]["entries"][K]>[]
|
|
174
|
+
| Partial<
|
|
175
|
+
Record<
|
|
176
|
+
"gt" | "gte" | "lt" | "lte" | "not",
|
|
177
|
+
InferOutput<Schema[Table]["entries"][K]>
|
|
178
|
+
>
|
|
179
|
+
>;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
type OmitExtends<T, U> = {
|
|
183
|
+
[K in keyof T as T[K] extends U ? never : K]: T[K];
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
type OmitExtendsRecordUndefined<T> = OmitExtends<T, Record<string, undefined>>;
|
|
187
|
+
|
|
188
|
+
type OmitExtendsUndefined<T> = OmitExtends<T, undefined>;
|
|
189
|
+
|
|
190
|
+
type Rewrite<
|
|
191
|
+
Self extends string,
|
|
192
|
+
Own extends string,
|
|
193
|
+
Other extends string,
|
|
194
|
+
Its extends string,
|
|
195
|
+
> =
|
|
196
|
+
// Image.id, Question.imageId -> Image.Question.
|
|
197
|
+
Its extends `${Uncapitalize<Self>}${Capitalize<Own>}`
|
|
198
|
+
? Other
|
|
199
|
+
: // Question.quizId, Quiz.id -> Question.Quiz.
|
|
200
|
+
Own extends `${Uncapitalize<Other>}${Capitalize<Its>}`
|
|
201
|
+
? Other
|
|
202
|
+
: // Quiz.coverId, Image.id -> Quiz.cover.
|
|
203
|
+
Own extends `${infer R}${Capitalize<Its>}`
|
|
204
|
+
? R
|
|
205
|
+
: // Image.id, Quiz.coverId -> Image.CoverQuiz.
|
|
206
|
+
Its extends `${infer R}${Capitalize<Own>}`
|
|
207
|
+
? `${Capitalize<R>}${Other}`
|
|
208
|
+
: never;
|
|
209
|
+
|
|
210
|
+
type Select<
|
|
211
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
212
|
+
Schema extends Record<string, ObjectSchema<any, any>>,
|
|
213
|
+
R extends Relations<Schema> = Relations<Schema>,
|
|
214
|
+
F extends Flatten<Schema> = Flatten<Schema>,
|
|
215
|
+
Table extends keyof F & keyof Schema = keyof F & keyof Schema,
|
|
216
|
+
W extends Join<R, Table> = Join<R, Table>,
|
|
217
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
218
|
+
> = W extends { with: any }
|
|
219
|
+
? InferOutput<Schema[Table]> & {
|
|
220
|
+
[K in keyof W["with"]]: K extends keyof F[Table]
|
|
221
|
+
? F[Table][K] extends {
|
|
222
|
+
Other: keyof F & keyof Schema;
|
|
223
|
+
type: "referencedBy";
|
|
224
|
+
}
|
|
225
|
+
? // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
226
|
+
(W["with"][K] extends { with: any }
|
|
227
|
+
? Select<Schema, R, F, F[Table][K]["Other"], W["with"][K]>
|
|
228
|
+
: InferOutput<Schema[F[Table][K]["Other"]]>)[]
|
|
229
|
+
: F[Table][K] extends {
|
|
230
|
+
Other: keyof F & keyof Schema;
|
|
231
|
+
type: "references";
|
|
232
|
+
}
|
|
233
|
+
? | undefined
|
|
234
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
235
|
+
| (W["with"][K] extends { with: any }
|
|
236
|
+
? Select<Schema, R, F, F[Table][K]["Other"], W["with"][K]>
|
|
237
|
+
: InferOutput<Schema[F[Table][K]["Other"]]>)
|
|
238
|
+
: never
|
|
239
|
+
: never;
|
|
240
|
+
}
|
|
241
|
+
: InferOutput<Schema[Table]>;
|
|
242
|
+
|
|
243
|
+
// https://www.geeksforgeeks.org/typescript/union-type-to-intersection-type-in-typescript/
|
|
244
|
+
type UnionToIntersection<U> = (
|
|
245
|
+
U extends object ? (k: U) => void : never
|
|
246
|
+
) extends (k: infer I) => void
|
|
247
|
+
? I
|
|
248
|
+
: never;
|
|
249
|
+
|
|
250
|
+
export function flatten<
|
|
251
|
+
Schema extends Record<string, ObjectSchema<any, any>>, // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
252
|
+
>(relations: Relations<Schema>): Flatten<Schema>;
|
|
253
|
+
|
|
254
|
+
export function primary<T>(): MetadataAction<T, { primary: true }>;
|
|
255
|
+
|
|
256
|
+
export function references<
|
|
257
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
258
|
+
R extends { entries: any },
|
|
259
|
+
K extends keyof R["entries"],
|
|
260
|
+
T,
|
|
261
|
+
>(
|
|
262
|
+
references: R,
|
|
263
|
+
key: K,
|
|
264
|
+
): MetadataAction<T, { key: R["entries"][K]; references: R }>;
|
|
265
|
+
|
|
266
|
+
export function relations<
|
|
267
|
+
Schema extends Record<string, ObjectSchema<any, any>>, // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
268
|
+
>(schema: Schema): Relations<Schema>;
|
package/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export function hydrate(
|
|
|
73
73
|
|
|
74
74
|
export function route(
|
|
75
75
|
path: string,
|
|
76
|
-
component: () => VNode<any>, // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
76
|
+
component: () => VNode<any> | VNode<never>, // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
77
77
|
): { component: typeof component; path: string };
|
|
78
78
|
|
|
79
79
|
/** @deprecated */
|