Skip to content

T-PAUA-eopt-lands-in-the-shared-base

State: closed/done · Impact: high · Complexity: small

Once no package on the bar reports an error under the flag, it moves into presets/base.json and the local declarations disappear. That closes the last gap between the shared bar and the root tsconfig.json, which has had the flag on all along — and it means a new package inherits it instead of choosing.

LocationRole today
packages/ts/tsconfig/presets/base.jsonDocuments the flag as the deliberate remaining gap, with the measured per-package cost and the instruction to re-measure rather than quote
packages/ts/agent-plugin/tsconfig.jsonDeclares the flag locally — ahead of the bar
packages/ts/dashboard-client/tsconfig.jsonDeclares it locally
packages/ts/flowline/tsconfig.jsonDeclares it locally
tsconfig.jsonThe substrate config; has the flag, and its distance from the preset is the visible measure of the remaining gap

presets/base.json sets exactOptionalPropertyTypes: true. Every local declaration is deleted — the three that were ahead of the bar, plus the nine added by T-77KU-eopt-clear-the-cheap-six and T-8O1A-eopt-clear-obsidian-and-agent-call. The root tsconfig.json drops its own copy, inheriting it like everything else.

The ratchet paragraph in base.json is replaced by a line recording that the flag was taken, so the next reader does not go looking for a gap that closed.

  1. Confirm the precondition: add the flag to presets/base.json and check the full graph reports zero errors. If any package still fails, it belongs to one of the two clearing tasks, not here.
  2. Set it in presets/base.json and delete every local declaration.
  3. Delete it from the root tsconfig.json too, and shorten the comment there — the “how far ahead of the bar the substrate is” note gets smaller.
  4. Rewrite the ratchet paragraph in base.json: what it cost, when it was taken, and that the gap it described is closed.
  5. Verify with tsc --showConfig that the resolved config of every consumer is unchanged except for gaining the flag.
LocationKindChange
packages/ts/tsconfig/presets/base.jsonmodifyset the flag; replace the ratchet note
tsconfig.jsonmodifydrop the now-inherited flag
12 package tsconfig.jsonmodifydrop the local declaration: the three that were ahead of the bar (agent-plugin, dashboard-client, flowline) plus the nine added by the two clearing tasks (agent-call, json-canvas-core, json-canvas-vue, node-tree, obsidian-bases, obsidian-editor, obsidian-md, panes, vault-contracts)
packages/ts/json-canvas-core/src/model/executor.test.tsmodifytwo casts, so the package’s own check passes — see below

Four of the twelve carried the flag as their only compilerOptions entry, so the block goes with it: agent-plugin, node-tree, obsidian-bases, panes are left as an extends and an include.

  • AC-1: presets/base.json sets the flag and no tsconfig.json in the repo declares it locally.
  • AC-2: moon run :check is green across the affected graph.
  • AC-3: tsc --showConfig for every consumer differs from before only by the flag.
  • AC-4: The ratchet paragraph no longer describes an open gap.
  • The ~23 configs not on the shared bar; they adopt the bar separately and will inherit the flag when they do.

json-canvas-core:check was already failing on main before this task started. #1740 added two tests constructing { text: undefined } and { color: undefined } while the package had the flag set locally. Both deliberately exercise the untyped-caller path, so they take the as unknown as UpdateNodeOperation cast the sibling test in the same file already uses, with the same reason. Fixed here rather than filed: the flag becoming repo-wide is what would otherwise carry a red check into every package.

The closing move of the ratchet raised in review on #1644.

T-77KU-eopt-clear-the-cheap-six, T-8O1A-eopt-clear-obsidian-and-agent-call


← Back to Tasks