Skip to content

fix(store): remove deprecated downlevelIteration from tsconfig files (partial TS7 prep, see #5163) - #5200

Closed
robert-md-or wants to merge 3 commits into
ngrx:mainfrom
robert-md-or:fix/typescript-7-deprecations
Closed

fix(store): remove deprecated downlevelIteration from tsconfig files (partial TS7 prep, see #5163)#5200
robert-md-or wants to merge 3 commits into
ngrx:mainfrom
robert-md-or:fix/typescript-7-deprecations

Conversation

@robert-md-or

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 32 tsconfig.json files where it no
longer serves a purpose:

  • 10 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.
  • 22 files had no explicit target anywhere in their chain and relied
    only on a modern lib entry (e.g. lib: ["es2018", "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 22 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, 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).

timdeschryver and others added 3 commits May 9, 2023 19:05
Co-authored-by: bruczhan <bruczhan@cisco.com>
Removes the deprecated downlevelIteration compiler option from 32
tsconfig files as part of the TypeScript 6/7 deprecation cleanup.

- 10 files already had an explicit modern target (ES2015+): flag
  removed, no other change needed.
- 22 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
robert-md-or marked this pull request as draft July 23, 2026 13:35
@robert-md-or

Copy link
Copy Markdown
Contributor Author

Closing this PR — it was accidentally based on the master branch, which is outdated (last updated in 2023) and not this repository's default branch (main). That mismatch caused unrelated conflicts across dozens of files that have nothing to do with this change.

Reopened cleanly against main here: #5201

Same change (removing the deprecated downlevelIteration option from affected tsconfig files), verified with local builds across all affected packages on the correct base branch.

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