Skip to content

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.

LocationRole today
packages/ts/tsconfig/presets/base.jsonDocuments 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

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.

  1. Re-measure per package before starting; the counts below are from 2026-09-01 and code moves.
  2. Take them cheapest first — vault-contracts, node-tree, panes (one error each), then obsidian-bases, then the two json-canvas packages.
  3. Fix rather than widen. Most of these are TS2375/TS2379: passing T | undefined into an optional property, where the fix is usually to omit the key rather than to loosen the type.
  4. Note that node-tree, panes and json-canvas-vue have pre-existing errors under tsc because their real gate is vue-tsc; work the delta, not the raw count — and measure that delta under vue-tsc, which sees the .vue SFCs and finds more than bare tsc does.
  5. Take json-canvas-core before json-canvas-vue. The latter compiles the former’s source through its bun export condition, so half its errors are really core’s and disappear when core is fixed.
LocationKindChange
solutions/determined/packages/vault-contracts/tsconfig.jsonmodifyset the flag
packages/ts/node-tree/tsconfig.jsonmodifyset the flag
packages/ts/panes/tsconfig.jsonmodifyset the flag
packages/ts/obsidian-bases/tsconfig.jsonmodifyset the flag
packages/ts/json-canvas-core/tsconfig.jsonmodifyset the flag
packages/ts/json-canvas-vue/tsconfig.jsonmodifyset the flag
  • AC-1: Each of the six declares exactOptionalPropertyTypes: true and its own check passes.
  • AC-2: Adding the flag to presets/base.json locally now surfaces errors in three packages rather than nine.
  • AC-3: No error is resolved by widening a type to include undefined where omitting the property is the correct fix.
  • none

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.


← Back to Tasks