RedactCallback
type RedactCallback = (params) => unknown;Defined in: src/types/index.ts:1058
Decide what a generated document inlines for one value.
Return params.value to keep it - which is also what lets the walk descend into it
- any other value to inline that instead, or
undefinedto redact, which inlines'[redacted]'in its place. Runs at generate time, on the server, so it may do whatever a synchronous function can.
Governs the two data blobs only. State names, choice conditions and variable annotations are drawn into the SVG itself, so they are not offered here: redacting them would change the diagram rather than the data travelling beside it.
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”unknown
Example
Section titled “Example”// Drop every Parameters block, and every execution payload.const redact: RedactCallback = ({ kind, path, value }) => kind === 'payload' || path.endsWith('.Parameters') ? undefined : value;