Skip to content

Commit

Permalink
refactor(remix-cloudflare-workers): bring RequestHandler in line wi…
Browse files Browse the repository at this point in the history
…th other adapters
  • Loading branch information
MichaelDeBoey committed Dec 15, 2022
1 parent 34cf504 commit 8eceac0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/remix-cloudflare-workers/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { createRequestHandler as createRemixRequestHandler } from "@remix-run/cl
*/
export type GetLoadContextFunction = (event: FetchEvent) => AppLoadContext;

export type RequestHandler = ReturnType<typeof createRequestHandler>;
export type RequestHandler = (event: FetchEvent) => Promise<Response>;

/**
* Returns a request handler for the Cloudflare runtime that serves the
Expand All @@ -33,7 +33,7 @@ export function createRequestHandler({
build: ServerBuild;
getLoadContext?: GetLoadContextFunction;
mode?: string;
}) {
}): RequestHandler {
let handleRequest = createRemixRequestHandler(build, mode);

return (event: FetchEvent) => {
Expand Down

0 comments on commit 8eceac0

Please sign in to comment.