1 |
|
2 |
|
3 |
|
4 | export type PickPartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>
|
5 |
|
6 | export type GlobbedRouteImports = Record<string, () => Promise<unknown>>
|
7 |
|
8 | export type Endpoint = (req: Request) => Response | string | Object | null
|
9 |
|
10 | export type Options = {
|
11 | ignore?: RegExp[]
|
12 | preserveApiRoutes?: boolean
|
13 | ignoreRequireErrors?: boolean
|
14 | ignoreEntryPoints?: boolean
|
15 |
|
16 | internal_stripLoadRoute?: boolean
|
17 |
|
18 | skipGenerated?: boolean
|
19 | importMode?: string
|
20 | platformRoutes?: boolean
|
21 | platform?: string
|
22 | }
|
23 |
|
24 | export type RenderApp = (props: RenderAppProps) => Promise<string>
|
25 |
|
26 | export type LoaderProps<Params extends Object = Record<string, string>> = {
|
27 | path: string
|
28 | params: Params
|
29 | request?: Request
|
30 | }
|
31 |
|
32 | export type RenderAppProps = {
|
33 | path: string
|
34 | preloads?: string[]
|
35 | css?: string[]
|
36 | loaderServerData?: any
|
37 | loaderData?: any
|
38 | loaderProps?: LoaderProps
|
39 | }
|