parseRulePayload function exported ✓ 100.0%

Last updated: 2026-03-05T10:53:28.866Z

Metrics

LOC: 4 Complexity: 2 Params: 1 Coverage: 100.0% (2/2 lines, 13x executed)

Signature

parseRulePayload(input: unknown): : FieldRule | null

Summary

Parses and validates a field rule payload against the strict Zod schema.

Tags

#@param input - Raw payload from a `SAVE_RULE` message#@returns Validated `FieldRule` or `null` if validation fails

Source Code

export function parseRulePayload(input: unknown): FieldRule | null {
  const result = fieldRuleSchema.safeParse(input);
  return result.success ? (result.data as FieldRule) : null;
}

No outgoing dependencies.

Impact (Incoming)

graph LR parseRulePayload["parseRulePayload"] handle["handle"] handle -->|uses| parseRulePayload style parseRulePayload fill:#dbeafe,stroke:#2563eb,stroke-width:2px click parseRulePayload "7f38eb7a1d01b99b.html" click handle "57ebaea8374ad16b.html"
SourceType
handle uses