diff --git a/packages/remix-app/types/remix-env.d.ts b/packages/remix-app/types/remix-env.d.ts index 777322b..8e1c5e9 100644 --- a/packages/remix-app/types/remix-env.d.ts +++ b/packages/remix-app/types/remix-env.d.ts @@ -11,17 +11,10 @@ declare var process: { declare module '@remix-run/cloudflare' { import type { DataFunctionArgs as RemixDataFunctionArgs } from '@remix-run/cloudflare' - export * from '@remix-run/cloudflare/index' + export * from '@remix-run/cloudflare/dist/index' - interface DataFunctionArgs extends Omit { + export interface DataFunctionArgs + extends Omit { context: LoadContext } - - export interface ActionFunction { - (args: DataFunctionArgs): null | Response | Promise - } - - export interface LoaderFunction { - (args: DataFunctionArgs): null | Response | Promise - } } diff --git a/packages/worker/src/index.ts b/packages/worker/src/index.ts index d41a242..886444f 100644 --- a/packages/worker/src/index.ts +++ b/packages/worker/src/index.ts @@ -1,4 +1,5 @@ import { getAssetFromKV } from '@cloudflare/kv-asset-handler' +import type { AppLoadContext } from '@remix-run/cloudflare' import { createRequestHandler } from '@remix-run/cloudflare' import * as build from 'remix-app' import manifestJSON from '__STATIC_CONTENT_MANIFEST' @@ -38,7 +39,7 @@ export default { } catch (error) {} try { - let loadContext: LoadContext = { env } + let loadContext: AppLoadContext = { env } return await handleRemixRequest(request, loadContext) } catch (error) { console.log(error)