Files
orca/src/shared/task-source-context-schema.ts
T
Kelvin Amoaba bd88cdeca8 perf(mobile): trim the page bundle back under its old budget (#39182)
* perf(mobile): trim the page bundle back under its old budget

* build(mobile): simplify the route entry anchors and zod table guard

* fix(mobile): import zod as a type in the RPC result reader
2026-11-07 03:28:04 +00:00

12 lines
426 B
TypeScript

import * as z from 'zod'
import { normalizeStoredTaskSourceContext, type TaskSourceContext } from './task-source-context'
export const TaskSourceContextSchema = z.unknown().transform((value, ctx): TaskSourceContext => {
const normalized = normalizeStoredTaskSourceContext(value)
if (!normalized) {
ctx.addIssue({ code: 'custom', message: 'Invalid task source context' })
return z.NEVER
}
return normalized
})