Skip to content

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 undefined to 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.

RedactParams

unknown

// Drop every Parameters block, and every execution payload.
const redact: RedactCallback = ({ kind, path, value }) =>
kind === 'payload' || path.endsWith('.Parameters') ? undefined : value;