• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mweststrate / immer / #1090
99%
master: 99%

Build:
Build:
LAST BUILD BRANCH: github-actions-ci
DEFAULT BRANCH: master
Ran 29 Sep 2026 09:32PM UTC
Jobs 1
Files 17
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Mar 2021 09:13PM UTC coverage: 98.517% (+0.002%) from 98.515%
#1090

push

web-flow
feature: Improved typescript types

The TypeScript typings of Immer have been rewritten, and support better inference now and are more accurate. The best practices are documented here: https://immerjs.github.io/immer/typescript. Please visit that page first when running into any compile errors after updating. 

The following changes have been made:

Immer can now infer the type of the `draft` for curried producers, if they are directly passed to another function / context from which the type can be inferred. So lines like these will now be strongly typed: `setTodo(produce(draft => { draft.done = true }))`, where `setTodo` is a React state updater (for example). Fixes #720.

Immer will now better respect the original types passed to a producer, and generally not wrap any returned types with `Immutable` automatically.

BREAKING CHANGE: It is no longer allowed to return `nothing` from a recipe if the target state doesn't accept `undefined`.

BREAKING CHANGE: It is no longer allowed to return arbitrary things from a recipe. Recipes should either return nothing, or something that is assignable to the original state type. This will catch mistakes with accidental returns earlier.

552 of 564 branches covered (97.87%)

Branch coverage included in aggregate %.

777 of 785 relevant lines covered (98.98%)

1116.94 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #1090.1 29 Sep 2026 09:32PM UTC 17
98.52
Source Files on build #1090
  • Tree
  • List 17
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 2c2f30e1 on github
  • Prev Build on
  • Next Build on
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc