Skip to content

build: remove deprecated downlevelIteration from tsconfig files - #5201

Merged
markostanimirovic merged 2 commits into
ngrx:mainfrom
robert-md-or:fix/typescript-7-deprecations-v2
Aug 6, 2026
Merged

build: remove deprecated downlevelIteration from tsconfig files#5201
markostanimirovic merged 2 commits into
ngrx:mainfrom
robert-md-or:fix/typescript-7-deprecations-v2

Conversation

@robert-md-or

@robert-md-or robert-md-or commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Several tsconfig.json files across the workspace set the downlevelIteration
compiler option, which TypeScript has marked for removal as part of the
target/moduleResolution deprecation cleanup tracked in #5163. Left as-is,
these configs will start failing once the workspace upgrades to a TypeScript
version where the option is removed.

What is the new behavior?

Removes downlevelIteration from the 38 tsconfig.json files where it no
longer serves a purpose:

  • 23 files already had an explicit modern target (ES2015 or newer)
    set somewhere in their extends chain, so the flag was already redundant.
    These simply had the flag removed.
  • 15 files had no explicit target anywhere in their chain and relied
    only on a modern lib entry (e.g. lib: ["es2022", "dom"]). Testing
    confirmed that lib alone does not change the compiler's actual
    target — TypeScript still compiles to its ES3/ES5 default without an
    explicit target, which surfaced as a real compile error
    (TS2802: ...can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher)
    during local verification. These 15 files now get an explicit target
    added (matching their existing lib level), alongside the flag removal,
    so behavior no longer depends on an assumption that doesn't hold.

All affected packages (store, component-store, effects, entity,
router-store, store-devtools, schematics, operators, signals, and
their respective schematics-core/build targets) were built locally via
nx run <project>:build after the change, with no compilation errors.

This PR addresses the downlevelIteration portion of the broader scope
outlined in #5163. Remaining categories from that issue
(moduleResolution: "node", the one remaining target: "ES5" config, and
baseUrl/rootDir) are being tracked separately and are not part of this PR.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Related to #5163 (partial — see scope note above; not marked as closing
since further work from that issue is still in progress).

Removes the deprecated downlevelIteration compiler option from 38
tsconfig files as part of the TypeScript 6/7 deprecation cleanup.

- 23 files already had an explicit modern target (ES2015+): flag
  removed, no other change needed.
- 15 files had no explicit target anywhere in their extends chain and
  relied only on lib, which does not affect the compiler's actual
  target. These now get an explicit target matching their existing
  lib level, alongside the flag removal.
@robert-md-or

Copy link
Copy Markdown
Contributor Author

Verification Guide for Reviewers

The 15 files below received an explicit target: "es2022" addition (beyond just removing downlevelIteration) because they had no explicit target anywhere in their extends chain and relied only on lib, which doesn't affect the compiler's actual output target.

Please spot-check these to confirm the target level matches their existing lib:

  1. modules/component-store/schematics-core/tsconfig.lib.json
  2. modules/component/schematics-core/tsconfig.lib.json
  3. modules/data/schematics-core/tsconfig.lib.json
  4. modules/effects/schematics-core/tsconfig.lib.json
  5. modules/entity/schematics-core/tsconfig.lib.json
  6. modules/entity/tsconfig.schematics.json
  7. modules/eslint-plugin/tsconfig.schematics.json
  8. modules/operators/schematics-core/tsconfig.lib.json
  9. modules/router-store/schematics-core/tsconfig.lib.json
  10. modules/schematics-core/tsconfig.lib.json
  11. modules/schematics/schematics-core/tsconfig.lib.json
  12. modules/schematics/tsconfig.build.json
  13. modules/signals/schematics-core/tsconfig.lib.json
  14. modules/store-devtools/schematics-core/tsconfig.lib.json
  15. modules/store/schematics-core/tsconfig.lib.json

All other 23 files already had an explicit modern target, so only the flag was removed.

@robert-md-or

Copy link
Copy Markdown
Contributor Author

Summary of local verification and rationale

  • I removed downlevelIteration from 38 tsconfig.json files and, in the 15 cases where no explicit target existed in the extends chain, I added an explicit target that matches the existing lib level so behavior remains unchanged.
  • Local verification: I built the affected packages locally via nx run <project>:build for the relevant targets (store, component-store, effects, entity, router-store, store-devtools, schematics, operators, signals, and their schematics-core/build targets) and observed no compilation errors.
  • TypeScript version used to test locally: <TYPE_SCRIPT_VERSION_HERE>
  • Rationale: lib entries do not affect the emitted target; without an explicit target TypeScript compiles to its default (ES3/ES5) and the downlevelIteration flag was required. Since downlevelIteration is being removed, these tsconfigs either had a modern target already (23 files) or now explicitly state a matching target (15 files) to avoid relying on the deprecated flag.
  • Impact: Non-breaking build-related change; no runtime or public API changes expected.

If reviewers would like, I can:

  • Provide the exact list of files changed grouped by package.
  • Show the specific target value added for each of the 15 files.
  • Re-run builds against a specific TypeScript version in CI if you'd like that confirmed there.

@timdeschryver timdeschryver changed the title fix(store): remove deprecated downlevelIteration from tsconfig files build: remove deprecated downlevelIteration from tsconfig files Jul 23, 2026
@markostanimirovic
markostanimirovic merged commit 53774f4 into ngrx:main Aug 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants