Skip to content

Commit fbb7dca

Browse files
committed
🎉 feat: ponyfill for node 18, probably
1 parent f26e6f5 commit fbb7dca

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ export const mapEarlyResponse = (
701701
)
702702

703703
return [
704-
responseToValue(response, res, set as SetResponse),
704+
responseToValue(response as Response, res, set as SetResponse),
705705
set as any
706706
]
707707
}

src/ws.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ export const attachWebSocket = (
191191
const websocket: AnyWSLocalHook = route.websocket
192192

193193
const validateMessage = getSchemaValidator(route.hooks.body, {
194+
// @ts-expect-error private property
195+
modules: app.definitions.typebox,
194196
// @ts-expect-error private property
195197
models: app.definitions.type as Record<string, TSchema>,
196198
normalize: app.config.normalize
@@ -199,6 +201,8 @@ export const attachWebSocket = (
199201
const validateResponse = getSchemaValidator(
200202
route.hooks.response as any,
201203
{
204+
// @ts-expect-error private property
205+
modules: app.definitions.typebox,
202206
// @ts-expect-error private property
203207
models: app.definitions.type as Record<string, TSchema>,
204208
normalize: app.config.normalize

0 commit comments

Comments
 (0)