site-panzai/node_modules/nuxt/dist/app/island-hash.d.ts
2026-11-13 13:57:04 +01:00

27 lines
1.2 KiB
TypeScript

/**
* Strip Vue scoped-style attributes (`data-v-*`) from island props before hashing
* or rendering. Scoped-id markers leak in from parent components and are not part
* of the logical island input.
*
* Used before island props are serialized and sent to the island handler.
*
* @internal
*/
export declare function filterIslandProps(props: Record<string, any> | null | undefined): Record<string, any>;
/**
* Serialize island props exactly as they will be sent to the island handler, so
* the client hashes the same string the server receives. Values that JSON
* drops or rewrites (`undefined`, functions, `NaN`, ...) are removed.
*
* @internal
*/
export declare function serializeIslandProps(props: Record<string, any> | null | undefined): string;
/**
* Compute the `hashId` segment embedded in an island URL (`/__nuxt_island/<Name>_<hashId>.json`).
*
* The hash binds the response to the requested `(name, props, context, source)` tuple, so the
* server can reject requests whose URL hash does not match the supplied query/body.
*
* @internal
*/
export declare function computeIslandHash(name: string, serializedProps: string, context: Record<string, any>, source: string | undefined): string;