Просмотр исходного кода

clarify timing projection schema cast

kingwl 1 месяц назад
Родитель
Сommit
c183fae6f9
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/subagent/subagent/src/projection.ts

+ 2 - 2
packages/subagent/subagent/src/projection.ts

@@ -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({