Files
SnowLuma/.pnpm-store/v11/files/48/3ae36e9a60a284211aad0e39c63130e1b96eb633b03e541b9fd2cbb91bbb29aa9985dac533a7e7457951c2d19450007e5e124515ad9786c12b7ab9888e483b
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

42 lines
1.2 KiB
Plaintext

import type { Manifest } from '../manifest'
import type { MakeRouteMatch } from '../Matches'
export interface DehydratedMatch {
i: MakeRouteMatch['id']
b?: MakeRouteMatch['__beforeLoadContext']
l?: MakeRouteMatch['loaderData']
e?: MakeRouteMatch['error']
u: MakeRouteMatch['updatedAt']
s: MakeRouteMatch['status']
ssr?: MakeRouteMatch['ssr']
g?: true
}
export interface DehydratedRouter {
manifest: Manifest | undefined
dehydratedData?: any
lastMatchId?: string
matches: Array<DehydratedMatch>
}
export interface TsrSsrGlobal {
router?: DehydratedRouter
// Signal that router hydration is complete
h: () => void
// Signal that stream has ended
e: () => void
// Cleanup all hydration resources and scripts
c: () => void
// p: Push script into buffer or execute immediately
p: (script: () => void) => void
buffer: Array<() => void>
// custom transformers, shortened since this is sent for each streamed value that needs a custom transformer
t?: Map<string, (value: any) => any>
// this flag indicates whether the transformers were initialized
initialized?: boolean
// router is hydrated and doesnt need the streamed values anymore
hydrated?: boolean
// stream has ended
streamEnded?: boolean
}