Context
The mechanical TypeScript source move and tsdown build are already in place. The next migration slice is to introduce shared boundary types without changing reporter behavior.
Reference: docs/typescript-migration-plan.md PR 4.
Scope
- Add shared reporter/game API/window-state type modules, such as:
src/types/reporter.ts
src/types/game-api.ts
src/types/window-state.ts
- Define
GameResponseEventDetail for game.response payloads: method, path, body, postBody, and time.
- Define a shared
Reporter interface and make reporter classes conform to it.
- Type
BaseReporter.report and BaseReporter.getJson.
- Add narrow boundary helpers such as
asRecord, parseInt10, getWindowShip, and getWindowSlotItem.
- Keep Kancolle response bodies as
unknown or coarse local interfaces at unsafe boundaries until each reporter is typed.
Acceptance criteria
- Entry/runtime and base reporter boundaries are typed.
- Reporter classes conform to a shared interface.
- No reporter payload field names or endpoint behavior changes.
- No broad catch/silent fallback behavior is introduced.
Validation
pnpm run typecheck
pnpm run build
Context
The mechanical TypeScript source move and
tsdownbuild are already in place. The next migration slice is to introduce shared boundary types without changing reporter behavior.Reference:
docs/typescript-migration-plan.mdPR 4.Scope
src/types/reporter.tssrc/types/game-api.tssrc/types/window-state.tsGameResponseEventDetailforgame.responsepayloads:method,path,body,postBody, andtime.Reporterinterface and make reporter classes conform to it.BaseReporter.reportandBaseReporter.getJson.asRecord,parseInt10,getWindowShip, andgetWindowSlotItem.unknownor coarse local interfaces at unsafe boundaries until each reporter is typed.Acceptance criteria
Validation
pnpm run typecheckpnpm run build