T-77KU-eopt-clear-the-cheap-six
State: closed/done · Impact: medium · Complexity: small
exactOptionalPropertyTypes is the last gap between the shared bar and the root
config, and presets/base.json names it as the ratchet deliberately not yet
taken. Measured cost across the 24 packages on the bar: 77 new errors in 9
packages, with 15 already clean. Six of those nine cost 16 errors between them,
so most of the remaining surface clears cheaply and the ratchet stops looking
like one large job.
| Location | Role today |
|---|---|
packages/ts/tsconfig/presets/base.json | Documents the flag as the next ratchet with the measured per-package cost; does not set it |
solutions/determined/packages/vault-contracts/tsconfig.json | +1 error under the flag |
packages/ts/node-tree/tsconfig.json | +1 under tsc, +2 under its real vue-tsc gate |
packages/ts/panes/tsconfig.json | +1 under tsc, +2 under vue-tsc |
packages/ts/obsidian-bases/tsconfig.json | +3 |
packages/ts/json-canvas-core/tsconfig.json | +5 |
packages/ts/json-canvas-vue/tsconfig.json | +10 under vue-tsc, but 5 are json-canvas-core’s own source, which it compiles |
Proposed
Section titled “Proposed”Each of the six sets exactOptionalPropertyTypes: true locally and compiles
clean — the same shape agent-plugin, dashboard-client and flowline already
use. That leaves three packages between the repo and moving the flag into the
base.
Approach
Section titled “Approach”- Re-measure per package before starting; the counts below are from 2026-09-01 and code moves.
- Take them cheapest first — vault-contracts, node-tree, panes (one error each), then obsidian-bases, then the two json-canvas packages.
- Fix rather than widen. Most of these are TS2375/TS2379: passing
T | undefinedinto an optional property, where the fix is usually to omit the key rather than to loosen the type. - Note that
node-tree,panesandjson-canvas-vuehave pre-existing errors undertscbecause their real gate isvue-tsc; work the delta, not the raw count — and measure that delta undervue-tsc, which sees the.vueSFCs and finds more than baretscdoes. - Take
json-canvas-corebeforejson-canvas-vue. The latter compiles the former’s source through itsbunexport condition, so half its errors are really core’s and disappear when core is fixed.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
solutions/determined/packages/vault-contracts/tsconfig.json | modify | set the flag |
packages/ts/node-tree/tsconfig.json | modify | set the flag |
packages/ts/panes/tsconfig.json | modify | set the flag |
packages/ts/obsidian-bases/tsconfig.json | modify | set the flag |
packages/ts/json-canvas-core/tsconfig.json | modify | set the flag |
packages/ts/json-canvas-vue/tsconfig.json | modify | set the flag |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: Each of the six declares
exactOptionalPropertyTypes: trueand its own check passes. - AC-2: Adding the flag to
presets/base.jsonlocally now surfaces errors in three packages rather than nine. - AC-3: No error is resolved by widening a type to include
undefinedwhere omitting the property is the correct fix.
Out of scope
Section titled “Out of scope”obsidian-md,obsidian-editorandagent-call— see T-8O1A-eopt-clear-obsidian-and-agent-call.- Moving the flag into the base — see T-PAUA-eopt-lands-in-the-shared-base.
Dependencies
Section titled “Dependencies”- none
Discovery context
Section titled “Discovery context”Raised as a review question on #1644 — “what would it take to make this the shared bar?” The answer was measured rather than taken from the base’s own comment, which claimed ~219 errors and >90% TS2379; both were stale.
Re-measured on 2026-09-05 against 28 packages on the bar, four more than when
the task was written. These six still cost exactly 16 under tsc. The other
three have grown: 78 errors rather than 61, agent-call 35, obsidian-editor
24, obsidian-md 19.