clarify timing projection schema cast

This commit is contained in:
kingwl
2026-08-03 12:04:44 +08:00
parent ad42057586
commit c183fae6f9

View File

@@ -19,8 +19,8 @@ interface TimingState {
descriptorSeen: boolean
}
// Cast for the optional values: under exactOptionalPropertyTypes zod infers
// `number | undefined` where the interface declares absent-or-number fields.
// Zod's optional output includes explicit `undefined`; with
// exactOptionalPropertyTypes the public interface permits omission only.
const projectionSchema = z.object({
settledMs: z.number().int().nonnegative(),
active: z.object({