Skip to content

TypeScript run store #248

Closed
Closed

Description

@jtklein-agents

Parent

Part of #236.

PR base

Open the pull request against spec/236-page-typescript (cut from master), not master. When that branch is missing, create it from origin/master and push it first.

What to build

The run of the Page store is TypeScript. It is the largest file in the conversion and is one leaf on its own.

Acceptance criteria

  • The run store is TypeScript with typed members
  • Event payloads the run subscribes to are typed in main; an event payload with no named type in main today gets one there (additive export) and is imported type-only
  • @types/lodash is a dev dependency (manifest and lock), added here unless the final-alignment leaf already added it; no hand-written declaration for lodash
  • The page-Node-imports test, which reads the run store by fixed path, reads the renamed file
  • The module-local owner interfaces other leaves declared for their view of the run stay as they are
  • Each file is whole-file renamed to .ts (.tsx when it holds JSX), keeps its shape and gains explicit types: no behaviour change, no refactor, no file split, MobX annotation maps untouched
  • These files have zero diagnostics under plain tsc and under --noImplicitAny, and hold no written any
  • yarn typecheck:baseline passes; every baseline line this leaf clears is deleted, and a still-JavaScript caller line whose fingerprint this leaf changes is rewritten in the same change
  • Every test, script and config entry that opens a renamed file by fixed path uses the new extension; import specifiers stay extensionless
  • A Renderer bridge call in these files reads window.rendererBridge with no cast, still inside each method (not once at module load), and the RendererBridge members these files call are tightened; a crossing payload type lives in main and is imported type-only
  • A bug typing exposes (a diagnostic that cannot clear without a runtime change) keeps its behaviour, gets the narrowest accommodation (a widened type, else a @ts-expect-error with a one-line reason), is filed as its own issue outside Spec: page TypeScript #236 and is linked from the pull request
  • yarn lint and yarn react-test pass, the tests changing only where a fixed path moved; yarn build still emits the main, preload and page output
  • tsconfig.json is unchanged: strict and noImplicitAny stay off, allowJs stays on

Activity

  1. added
    ready-for-agent
    on Nov 16, 2026
  2. jtklein-agents commented on Nov 17, 2026

    @jtklein-agents
    OwnerAuthor

    Merged in #258 into spec/236-page-typescript. Follow-up bug: #259.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions