mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Replace `as unknown as SessionOptions["X"]` call-site casts with typed stub helpers from a new `test-utils/session-stubs.ts` module. Unsafe assertions are now contained to that single infrastructure file, keeping all call sites in the two fully-fixed test files clean. Files fully fixed (typeAware: true → 0 errors): - session.workspaces.test.ts: 119 → 0 - session.test.ts: 27 → 0 Helpers added in session-stubs.ts: - asSessionLogger / asAgentManager / asAgentStorage / asDownloadTokenStore / asPushTokenStore / asChatService / asScheduleService / asLoopService / asCheckoutDiffManager / asDaemonConfigStore / asTerminalManager / asGitHubService / asWorkspaceGitService / asScriptRouteStore / asWorkspaceScriptRuntimeStore - asSessionInternals<T> for private session access - filterByType / findByType message helpers - createProviderSnapshotManagerStub returning typed spy refs