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)
| Source | Type |
|---|---|
| handle | uses |