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 Jan 21, 2023
1 parent 14f0720 commit 2cb0d37
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 2cb0d37

Please sign in to comment.