Skip to content

Commit 0e31479

Browse files
authored
add jsdoc to serialization mode (#2088)
1 parent 97a1793 commit 0e31479

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

packages/start/src/config/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ export interface SolidStartOptions {
2222
extensions?: string[];
2323
middleware?: string;
2424
serialization?: {
25-
// This only matters for server function responses
25+
/**
26+
* The serialization mode to use for server functions/actions.
27+
* The "js" mode uses a custom binary format that is more efficient than JSON, but requires a custom deserializer (with `eval()`) on the client.
28+
* A strong CSP should block `eval()` executions, which would prevent the "js" mode from working.
29+
* The "json" mode uses JSON for serialization, which is less efficient but can be deserialized with `JSON.parse` on the client.
30+
*
31+
* @default "json"
32+
*/
2633
mode?: "js" | "json";
2734
};
2835
}

0 commit comments

Comments
 (0)