From 9a62e5584261ad9eaecd56885ed1a22489d2e84e Mon Sep 17 00:00:00 2001 From: Yusuke Wada Date: Mon, 23 Sep 2024 15:41:13 +0900 Subject: [PATCH] make `getLoadContext` not option for `RemixMiddlewareOptions` --- src/cloudflare-pages.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cloudflare-pages.ts b/src/cloudflare-pages.ts index 685d872..1820658 100644 --- a/src/cloudflare-pages.ts +++ b/src/cloudflare-pages.ts @@ -10,7 +10,7 @@ import type { GetLoadContext } from './remix' interface RemixMiddlewareOptions { build: ServerBuild mode?: 'development' | 'production' - getLoadContext?: GetLoadContext + getLoadContext: GetLoadContext } function remix({ mode, build, getLoadContext }: RemixMiddlewareOptions) { @@ -18,7 +18,6 @@ function remix({ mode, build, getLoadContext }: RemixMiddlewareOptions) { const requestHandler = createRequestHandler(build, mode) const args = createGetLoadContextArgs(c) - // @ts-expect-error not typed well const loadContext = getLoadContext(args) return await requestHandler( c.req.raw,