You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
0.3.0 regression: TS2790 on delete of index-signature properties (ProcessEnv, DOMStringMap); 0.2.0 and tsc 7.1.0-dev report none #52
tsc-rs 0.3.0 reports TS2790: The operand of a 'delete' operator must be optional. on delete of properties that come from a string index signature (NodeJS.ProcessEnv, DOMStringMap) with exactOptionalPropertyTypes: true. tsc-rs 0.2.0 and typescript@7.1.0-dev.20260929.1 (the revision the port is pinned to) report none on the same tree, so this looks like a regression between v0.2.0 and v0.3.0.
Counts
Checked a T3 Code checkout based on v0.0.45 with --noEmit --incremental false --composite false:
One file containing export {}; delete process.env.HOME;, the same compilerOptions as apps/server (strict, exactOptionalPropertyTypes, noUncheckedIndexedAccess, module/moduleResolution NodeNext, lib: ["ESNext", "esnext.disposable"], types: ["node"]) and @types/node 24.12.4: 0 errors on 0.3.0.
A tsconfig that extends apps/server/tsconfig.json with files: ["src/os-jank.test.ts"] (99 non-node_modules files in the program): 0 errors.
Only the full apps/server program (2,350 files) reproduces it. So the result seems to depend on what has been checked earlier in the program.
Environment
tsc-rs 0.3.0, darwin-arm64 release archive (run as the binary, not via npm)
macOS (Darwin 25.6.0), Apple M5 Pro
@types/node 24.12.4
I found this while timing tsc-rs on this project. The speedup holds up: 21.0 s → 8.4 s over five projects with the Effect diagnostics on.
Thanks for the clear report. We reproduced it on T3 Code v0.0.45 (linux-x64): 24 TS2790 in apps/server and 3 in apps/web.
The checker did not change between 0.2.0 and 0.3.0. 0.3.0 moved the built-in Effect diagnostics from effect-tsgo 0.46.1 to 0.51.1. The unstableApiUsage and experimentalApiUsage rules came in between, in effect-tsgo 0.47.0. T3 Code's tsconfig.base.json enables the @effect/language-service plugin, so these rules run.
Why it happens: the two rules look up the symbol of each identifier. For obj.key, where key comes from an index signature (process.env, dataset), that lookup saves an index-signature symbol on the node. A later Effect rule asks for the type of the delete expression, which runs the delete check again. The check now sees that saved symbol, which is not optional, so with exactOptionalPropertyTypes it reports TS2790.
effect-tsgo 0.51.1 prints the same lines; its output on both apps is the same as tsc-rs 0.3.0, byte for byte. Plain typescript 7.x prints none because it does not run the plugin. T3 Code's own pin, @effect/tsgo 0.41.0, prints none because it is older than these rules. With the plugin, it reproduces in one file. For your extends + files: ["src/os-jank.test.ts"] setup we get 1 TS2790 on 0.3.0, main and effect-tsgo 0.51.1. We do not yet know why you got 0 there, or 25 instead of 24 on apps/server. The upstream issue is Effect-TS/tsgo#820.
Workaround: turn the two rules off in the existing diagnosticSeverity map of the plugin entry:
With this, tsc-rs 0.3.0 gives 0 TS2790 on both apps, and the same output as 0.2.0. A child tsconfig with "plugins": [] does not turn off the inherited plugin, so use the rule options.
tsc-rs keeps its Effect output equal to effect-tsgo 0.51.1. We will port the upstream fix when it lands.
a.ts(2,8): error TS2790: The operand of a 'delete' operator must be optional.
exactOptionalPropertyTypes
Plugin entry
Result
false
enabled
clean
true
none
clean
true
"diagnostics": false
clean
true
unstableApiUsage and experimentalApiUsage off
clean
true
enabled
TS2790 on line 2
Only the dotted form reports; delete env["BAR"] on line 3 is clean. This also fits the earlier "does not reproduce in isolation" result: the file needs no large program around it, only the plugin and exactOptionalPropertyTypes.
Upstream: Effect-TS/tsgo#820 closed on 2026-10-12 with Effect-TS/tsgo#828 (merge 7d051dd5). That merge is 15 commits ahead of 47cb1ed7, the @effect/tsgo@0.51.1 commit PORTING.md pins, so the pin does not include it. I only tested the 0.8.0 release, not current main.
Activity
docs(queue): issues #49, #50, #52 lanes
t3dotgg commentedon Oct 11, 2026
Note
🤖 Claude Opus 5.5 responding on behalf of Theo
Thanks for the clear report. We reproduced it on T3 Code v0.0.45 (linux-x64): 24 TS2790 in
apps/serverand 3 inapps/web.The checker did not change between 0.2.0 and 0.3.0. 0.3.0 moved the built-in Effect diagnostics from effect-tsgo 0.46.1 to 0.51.1. The
unstableApiUsageandexperimentalApiUsagerules came in between, in effect-tsgo 0.47.0. T3 Code'stsconfig.base.jsonenables the@effect/language-serviceplugin, so these rules run.Why it happens: the two rules look up the symbol of each identifier. For
obj.key, wherekeycomes from an index signature (process.env,dataset), that lookup saves an index-signature symbol on the node. A later Effect rule asks for the type of thedeleteexpression, which runs thedeletecheck again. The check now sees that saved symbol, which is not optional, so withexactOptionalPropertyTypesit reports TS2790.effect-tsgo 0.51.1 prints the same lines; its output on both apps is the same as tsc-rs 0.3.0, byte for byte. Plain
typescript7.x prints none because it does not run the plugin. T3 Code's own pin,@effect/tsgo0.41.0, prints none because it is older than these rules. With the plugin, it reproduces in one file. For yourextends+files: ["src/os-jank.test.ts"]setup we get 1 TS2790 on 0.3.0, main and effect-tsgo 0.51.1. We do not yet know why you got 0 there, or 25 instead of 24 onapps/server. The upstream issue is Effect-TS/tsgo#820.Workaround: turn the two rules off in the existing
diagnosticSeveritymap of the plugin entry:With this, tsc-rs 0.3.0 gives 0 TS2790 on both apps, and the same output as 0.2.0. A child tsconfig with
"plugins": []does not turn off the inherited plugin, so use the rule options.tsc-rs keeps its Effect output equal to effect-tsgo 0.51.1. We will port the upstream fix when it lands.
docs(state): issues #49, #50, #52 results
IAmJSD commentedon Nov 6, 2026
Still reproduces on tsc-rs 0.8.0 (via
@tsc-rs/typescript, darwin-arm64), and the upstream fix now exists, so this looks ready to port.Minimal repro, one file, no
@types/node:{ "compilerOptions": { "strict": true, "noEmit": true, "types": [], "exactOptionalPropertyTypes": true, "plugins": [{ "name": "@effect/language-service" }] }, "files": ["a.ts"] }exactOptionalPropertyTypesfalsetruetrue"diagnostics": falsetrueunstableApiUsageandexperimentalApiUsageofftrueOnly the dotted form reports;
delete env["BAR"]on line 3 is clean. This also fits the earlier "does not reproduce in isolation" result: the file needs no large program around it, only the plugin andexactOptionalPropertyTypes.Upstream: Effect-TS/tsgo#820 closed on 2026-10-12 with Effect-TS/tsgo#828 (merge
7d051dd5). That merge is 15 commits ahead of47cb1ed7, the@effect/tsgo@0.51.1commitPORTING.mdpins, so the pin does not include it. I only tested the 0.8.0 release, not currentmain.