ts-pattern
Advanced tools
Comparing version 3.2.4 to 3.2.5
@@ -41,3 +41,3 @@ import { IsPlainObject, Primitives, IsLiteral } from './helpers'; | ||
] : never : p extends readonly [infer p1, infer p2] ? i extends readonly [infer i1, infer i2] ? [InvertPatternForExclude<p1, i1>, InvertPatternForExclude<p2, i2>] : never : InvertPatternForExclude<pp, ii>[] : never : p extends Map<infer pk, infer pv> ? i extends Map<any, infer iv> ? Map<pk, InvertPatternForExclude<pv, iv>> : never : p extends Set<infer pv> ? i extends Set<infer iv> ? Set<InvertPatternForExclude<pv, iv>> : never : IsPlainObject<p> extends true ? i extends object ? [keyof p & keyof i] extends [never] ? never : { | ||
[k in keyof p & keyof i]: InvertPatternForExclude<p[k], i[k]>; | ||
[k in keyof p]: k extends keyof i ? InvertPatternForExclude<p[k], i[k]> : p[k]; | ||
} : never : never; |
{ | ||
"name": "ts-pattern", | ||
"version": "3.2.4", | ||
"version": "3.2.5", | ||
"description": " The exhaustive Pattern Matching library for TypeScript.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
<h1 align="center">ts-pattern</h1> | ||
<p align="center"> | ||
An exhaustive Pattern Matching library for <a href="https://github.com/microsoft/TypeScript">TypeScript</a> | ||
The exhaustive Pattern Matching library for <a href="https://github.com/microsoft/TypeScript">TypeScript</a> | ||
with smart type inference. | ||
@@ -42,3 +42,3 @@ </p> | ||
- Supports properties selection, via the `select(<name?>)` function. | ||
- Tiny bundle footprint (**only 1.4kb**). | ||
- Tiny bundle footprint ([**only 1.4kb**](https://bundlephobia.com/package/ts-pattern@3.2.4)). | ||
@@ -731,4 +731,2 @@ ## What is Pattern Matching? | ||
(e.g. `null | undefined | string`) and you may want to treat them as equivalent. | ||
This is often not the case in many contexts. However, if they do appear together | ||
in a union and you do want to treat them as equivalent then this may come in handy. | ||
@@ -788,4 +786,4 @@ ```ts | ||
let input: Input = [ | ||
{ title: 'Hello world!', content: 'Iβm a very interesting content' }, | ||
{ title: 'Bonjour!', content: 'Iβm a very interesting content too' }, | ||
{ title: 'Hello world!', content: 'This is a very interesting content' }, | ||
{ title: 'Bonjour!', content: 'This is a very interesting content too' }, | ||
]; | ||
@@ -792,0 +790,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75427
1074