Skip to content

Commit 19e957c

Browse files
committed
add jsdoc to serialization mode
1 parent 97a1793 commit 19e957c

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages/start/src/config/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@ 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+
*/
33+
2634
mode?: "js" | "json";
2735
};
2836
}

0 commit comments

Comments
 (0)