effect-io-ai

Package: effect
Module: Redactable

Redactable.redact

Returns a redacted value if it implements Redactable, otherwise returns it unchanged.

When to use

Use as the general-purpose entry point for redaction when the input may or may not implement the redaction protocol.

Details

This function calls isRedactable and, when it returns true, delegates to getRedacted.

Gotchas

Redaction is not recursive. Nested redactable values inside the returned object are not automatically redacted.

See

Signature

declare const redact: (u: unknown) => unknown

Source

Since v3.10.0