Skip to content

Leadership1 publisherNot yet confirmed elsewhere2 min readPublished

Redux Toolkit 2.13 adds TypeScript 7 support while holding its exported API steady

Redux Toolkit 2.13 adds official TypeScript 7 support and moves to a TSDown build, keeping its APIs unchanged from 2.12. The cost of upgrading is a TypeScript 5.6 floor plus bug fixes that change runtime results in edge cases.

The Board Room · Leadership desk

Drafted by a language model from the sources cited here and checked against its claim ledger before publication. How we use AISend a correction

What happened

  • Redux Toolkit now tests only against TypeScript 5.6 and later, matching DefinitelyTyped's support window, though earlier versions may still work.
  • The 2.13 bundles differ from 2.12, with smaller CommonJS artifacts and slightly different helper output in the legacy-esm files.
  • RTK Query's isSuccess no longer flips from false to true on an unrelated re-render while a query is refetching after an error.
  • createEntityAdapter's setAll now keeps the last item when handed duplicate IDs, matching how setMany already behaved.

Compiled by The Board RoomSomething wrong?How this is made

Why it matters

  • constraint Teams on TypeScript older than 5.6 can still install 2.13, but they would be running a pairing the maintainers no longer test, so the compiler upgrade has to come first.
  • decision Because fixed behavior in isSuccess, setAll and rejectedWithValue changes results in edge cases, passing the runtime test suite should gate the upgrade, and a clean type-check does not prove it is safe.
  • exposure Apps that consume the legacy-esm build are most exposed to the changed helper output, and finding any regression there depends on users reporting it.
  • capability Per-commit pkg.pr.new previews let a team try a specific fix in its own app before it reaches a published release.

"Unchanged" here describes the package's shape. The release notes say "the package layout, exports definitions, and exported APIs are all unchanged from 2.12" [2]. Import paths and type signatures carry over. Runtime results in several edge cases do not, because the same release ships a long list of behavior fixes [7][9][10].

The build swap was checked with some care. The maintainers say they ran the new output through attw, confirmed that CJS and ESM entry points load in both dev and prod builds, and confirmed that the legacy-esm artifacts still target ES2017 [3]. The repo-wide overhaul also replaced Yarn with PNPM, ESLint with Oxlint and Prettier with Oxfmt, but the TSDown switch is the only part that touches what users install [1]. Anything those checks missed will come in through issue reports, and the notes ask for them on any build-related behavior difference [4].

The TypeScript 7 work matters mostly for sequencing. TS 7.0 is the native Go port of the compiler. The maintainers say they fixed the remaining type errors RTK produced under 7.0 and 7.1, and 7.0 now runs in their CI matrix [5]. A team already on TypeScript 5.6 or later, the range RTK now tests [6], can take 2.13 this quarter on its current compiler. When that team moves to TS7 later, the state library has already been checked and the compiler change can go in on its own. Only 7.0 is named in CI; 7.1 was checked but is not listed there [5].

The case against calling the upgrade routine is in the fixes list. createAsyncThunk now sets rejectedWithValue when rejectWithValue is called with a falsy payload. It also no longer swallows aborts that happen before the pending action is dispatched [9]. RTK Query polling now reads cache state when each poll fires, so skipPollingIfUnfocused honors focus lost after scheduling and polls stop once their cache entry is removed [10]. A race is closed in which a duplicate request rejected by the thunk condition let queued tag invalidations run early and get lost, leaving stale data in the cache [11].

I think the low-risk reading holds for types and imports. For runtime behavior it holds on one condition. Code that relied on the old results was relying on defects that a type-check will not surface, so the app's test suite has to pass against 2.13 before the upgrade goes in.

What to watch

  • Issues filed against 2.13 that the maintainers label build-related, especially from CommonJS or legacy-esm consumers.
  • Whether TypeScript 7.1 joins 7.0 in the RTK CI test matrix.
  • A 2.13.x patch release that reverts or adjusts any of the behavior fixes after user reports.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories