فهرست منبع

fix: restore master's test casts mangled by a stale-types eslint --fix

The interrupted pre-commit hook ran eslint --fix while client lib/types
were stale, which stripped two deliberate 'as' casts from master's
tests; one fails typecheck under exactOptionalPropertyTypes without it.
Restore both files to master's content.
Tianyi Cui 2 ماه پیش
والد
کامیت
686cb30f9d

+ 1 - 1
packages/client/ui-conversation/tests/input-machine.spec.ts

@@ -36,7 +36,7 @@ function effectAt<T extends InputEffect['type']>(
 ): Extract<InputEffect, { type: T }> {
   const e = effects[index]
   expect(e?.type).toBe(type)
-  return e
+  return e as Extract<InputEffect, { type: T }>
 }
 
 /** Drive plain → adjudicating and hand back the minted attempt. */

+ 1 - 1
packages/client/ui-subagent/tests/browser-plugin.spec.ts

@@ -22,7 +22,7 @@ function summary(partial: Partial<SessionSummary> & { id: SessionId }): SessionS
     running: false,
     updatedAt: 0,
     ...partial,
-  }
+  } as SessionSummary
 }
 
 const sid = (id: string) => id as SessionId