UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

24 lines 884 B
import type { One } from '../vite/types'; export type LazyRoutes = { pages?: Record<string, () => Promise<any>>; serverEntry: () => Promise<{ default: { render: (props: any) => any; renderStream?: (props: any) => Promise<ReadableStream>; }; }>; api: Record<string, () => Promise<any>>; middlewares: Record<string, () => Promise<any>>; }; type WorkerHandlerOptions = { oneOptions: One.PluginOptions; buildInfo: One.BuildInfo; lazyRoutes: LazyRoutes; disableModuleCache?: boolean; }; export declare function createWorkerHandler(options: WorkerHandlerOptions): { handleRequest: (request: Request, env?: unknown, executionCtx?: unknown) => Promise<Response | null>; updateRoutes: (newBuildInfo: One.BuildInfo, newLazyRoutes?: LazyRoutes) => void; }; export {}; //# sourceMappingURL=workerHandler.d.ts.map