v5.1.2
The main thing
When combining P.nonNullable
and P.nullish
, you should get an exhaustive pattern matching expression, but the following case was incorrectly considered non-exhaustive:
declare const input: {
nested: string | number | null | undefined;
};
const res = match(input)
.with({ nested: P.nonNullable }, (x) => {/* ... */})
.with({ nested: P.nullish }, (x) => {/* ... */})
// should type-check
.exhaustive();
This is fixed now.
What's Changed
- build(deps): bump postcss and react-scripts in /examples/gif-fetcher by @dependabot in #243
- build(deps): bump loader-utils and react-scripts in /examples/gif-fetcher by @dependabot in #242
- build(deps): bump jsdom and react-scripts in /examples/gif-fetcher by @dependabot in #241
- build(deps): bump tough-cookie and react-scripts in /examples/gif-fetcher by @dependabot in #240
- build(deps): bump shell-quote and react-scripts in /examples/gif-fetcher by @dependabot in #239
- chore: add P.map specific jsdoc for P.map by @momentiris in #245
- build(deps-dev): bump ejs from 3.1.9 to 3.1.10 in /examples/gif-fetcher by @dependabot in #249
- build(deps-dev): bump ejs from 3.1.9 to 3.1.10 by @dependabot in #248
- fix: exhaustive checking with nested P.nonNullable patterns by @gvergnaud in #252
New Contributors
- @momentiris made their first contribution in #245
Full Changelog: v5.1.1...v5.1.2