Skip to content

Work plan: W1 to W10 ​

The remaining work is split into ten workstreams. The design of each one, with its gates and a checklist, is in the gap register. The state of each one is taken from the progress notes. This page is the short version of both.

W1

Generics and inference solver

In progress

The largest source of call and generic mismatches.

Size: LargePriority: High

Done Split into infer, instantiate and reduce; named cut reasons; reducer contract for six operators; opt-in inference trace.

Next One Budget object, the solver outcome contract, the tsc priority set, return-type and higher-order inference.

Design and checklist
W2

Options and unused-code diagnostics

In progress

Common in real projects and cheap to add.

Size: Small to mediumPriority: High

Done Every option is read through an accessor that records the read, so an option no unit reads re-checks nothing.

Next The unused-code pass, then the missing options (isolatedModules, verbatimModuleSyntax and the rest).

Design and checklist
W3

Thin language areas

Open

Decorators, JSX, `using`, `unique symbol`, module augmentation and triple-slash directives are hit by real code.

Size: Medium eachPriority: Medium

Next One area at a time: fixtures first, then the check, then a registry entry with an owner.

Design and checklist
W4

JavaScript and JSDoc checking

Open

A whole class of projects, and the largest item on the list.

Size: Very largePriority: Later

Next Decide whether JS support is in the first public release or a documented later item.

Design and checklist
W5

Build mode and project references

Open

Monorepos and CI.

Size: LargePriority: Medium

Next `tsox build` over the reference graph, with a content-hash up-to-date check. Needs W6 outputs.

Design and checklist
W6

Declaration emit

Open

Library authors need `.d.ts` files.

Size: LargePriority: Medium

Next Fast path from explicit annotations first, inferred path second.

Design and checklist
W7

Robustness

Open

The checker runs on untrusted text in editors, a browser and agents.

Size: MediumPriority: High before publishing

Done A panic inside one unit is already contained in `unit.rs`.

Next Fuzz targets, panic safety for requests, time and memory caps, an audit of every `unsafe` block.

Design and checklist
W8

Open-source readiness

Open

Contributors cannot join without it.

Size: MediumPriority: High before publishing

Next Licence notices for vendored files, community files, first-task issues, release pipeline, semver policy.

Design and checklist
W9

Conformance dashboard and observability

Open

Shows contributors where to help.

Size: SmallPriority: Medium

Next A generated conformance page with a trend per commit, and fallback counters shown beside it.

Design and checklist
W10

Diagnostic ownership

Done

The owner map has to use tsox's own code namespace.

Size: SmallPriority: High, early

Done `cargo xtask owners` generates the map of every code to its message function and raising code, with the 9000s backlog; CI checks it is current.

Next A fixture-per-code column.

Design and checklist

Not everything can run at once. The order puts structure before behaviour: small enabling work first, the solver split before the solver changes, and the work that must precede publishing before the work that does not.

  1. Phase 1W10W2W10 owner map and the W2 options accessor. Small, and they unblock contributors and incremental checking.
  2. Phase 2W1W2W1 steps 1 to 4 (split, budget, registry, trace), then the W2 unused-code pass and missing options. Structure first, then common diagnostics.
  3. Phase 3W7W8Fuzzing, panic safety, legal and community files. Required before publishing.
  4. Phase 4W1W9W1 steps 5 to 7 (priorities, return-type, higher-order) and the dashboard. Behaviour changes against a tracked baseline.
  5. Phase 5W3W6Language areas one at a time, and declaration emit on the fast path.
  6. Phase 6W5W6Build mode, and the inferred path of declaration emit. Build mode needs the emit outputs.
  7. Phase 7W4JavaScript and JSDoc. Large, and optional for a first release.

Two cuts are named in advance. W4 (JavaScript and JSDoc) and the inferred half of W6 (declaration emit) go first if the scope has to shrink.

W1 in detail: generics and inference solver ​

W1 is the highest-risk workstream: changing inference priorities changes results across the corpus. The controls are a recorded baseline before any move, one change at a time, and the inference trace.

StepWhat it doesState
1. Splitgenerics.rs becomes infer/, instantiate/ and reduce/, with identical tests.Done
2. Shared budgetEvery cut-off is named and counted per reason (CutReason). One Budget object passed explicitly is still open.Partly
3. Reducer contractSix operators return Reduced, Deferred or TooComplex. Record is still direct, and the solver's own Resolved, Partial, Failed outcome is open.Partly
4. Inference traceGenericInferenceSession::with_trace, with zero cost when off. Not yet behind a CLI flag.Done
5. Priority setReplace three priority levels with tsc's set, mapped one to one first. Needs the priority list from the pinned TypeScript 6.0.3 source.Open
6. Return-type inferenceThe contextual return type of a call becomes a candidate source, so const x: Box<string> = make() infers T.Open
7. Higher-order inferenceGeneric function arguments in three stages: one signature, pipe and compose chains, overloaded arguments.Open

Gate for every step. A fixture per priority kind and per reducer with output from tsc 6.0.3, and identical diagnostics on the corpus after each structural step.

W2 in detail: options and unused-code diagnostics ​

StepWhat it doesState
Options accessor and read logEvery option is read through CheckContext::option, which records the read. An option no unit reads re-checks none of the 13 units in the measurement (it was 13 of 13).Done
Unused-code passnoUnusedLocals and noUnusedParameters as a registered pass that runs after type checking.Open
Missing optionsisolatedModules, verbatimModuleSyntax, erasableSyntaxOnly, allowSyntheticDefaultImports and esModuleInterop, resolveJsonModule, allowUnusedLabels.Open
DocumentationEach option documented with the codes it controls.Open

The read log also produced a finding worth knowing: 8 of the 19 CheckOptions flags are never read by the checker, so it behaves as if the strict family were always on. The full list is in the progress notes.

Gate. A fixture per option and per unused-code case compared with tsc, and a corpus run grouped by the new codes.

Risks and open decisions ​

  • Keyword evidence. Every "no hits" in the register is a search result. Read the code once before starting a workstream to confirm the gap is real.
  • Scope. Ten workstreams cannot run at once.
  • Corpus licensing may limit what can be published with the repository.
  • Decisions still to make: whether JavaScript support is in the first release, the licence, whether declaration emit ships before build mode, and the standard-versus-experimental decorator default.

MIT OR Apache-2.0