Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/security / / GuardrailResult

Type Alias: GuardrailResult<TValue>

ts
type GuardrailResult<TValue> = 
  | {
  ok: true;
}
  | {
  action: GuardrailAction;
  message: string;
  metadata?: Readonly<Record<string, unknown>>;
  ok: false;
  rewrite?: TValue;
};

Defined in: packages/security/src/guardrails/types.ts:62

Result of a single guardrail check.

Type Parameters

Type ParameterDefault type
TValueunknown

Stable