Skip to content

Commit

Permalink
refactor: type correct
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Mar 26, 2024
1 parent 0592d0e commit 2098d48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/server/src/ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export default function createRequestHandler(

if (typeof FetchEvent !== 'undefined' && args[0] instanceof FetchEvent) {
// worker mode
const [ev, opts] = args;
const [ev, opts] = args as IWorkerRequestHandlerArgs;
const { pathname, searchParams } = new URL(ev.request.url);

ret = {
Expand Down Expand Up @@ -327,7 +327,7 @@ export default function createRequestHandler(
};
} else {
// express mode
const [req, res, next] = args;
const [req, res, next] = args as IExpressRequestHandlerArgs;

ret = {
req: {
Expand Down

0 comments on commit 2098d48

Please sign in to comment.