ts-pattern
Advanced tools
Comparing version 4.1.4-test.0 to 4.1.4
@@ -48,2 +48,3 @@ export declare type ValueOf<a> = a extends any[] ? a[number] : a[keyof a]; | ||
export declare type Primitives = number | boolean | string | undefined | null | symbol | bigint; | ||
export declare type NonLiteralPrimitive = Exclude<Primitives, undefined | null>; | ||
export declare type TupleKeys = 0 | 1 | 2 | 3 | 4; | ||
@@ -58,1 +59,3 @@ export declare type Union<a, b> = [b] extends [a] ? a : [a] extends [b] ? b : a | b; | ||
export declare type All<bools extends boolean[]> = bools[number] extends true ? true : false; | ||
export declare type Extends<a, b> = [a] extends [b] ? true : false; | ||
export declare type Not<a extends boolean> = a extends true ? false : true; |
import { DeepExclude } from './DeepExclude'; | ||
import { IsPlainObject, Primitives, IsLiteral, ValueOf, Compute, Cast, Equal } from './helpers'; | ||
import { IsPlainObject, Primitives, IsLiteral, ValueOf, Compute, Cast, Equal, Extends, Not, All, NonLiteralPrimitive } from './helpers'; | ||
import type { Matcher, Pattern, ToExclude } from './Pattern'; | ||
@@ -47,3 +47,7 @@ declare type OptionalKeys<p> = ValueOf<{ | ||
b | ||
] extends [never] ? never : unknown extends a ? never : DeepExclude<a, b>; | ||
] extends [never] ? never : unknown extends a ? never : All<[ | ||
Extends<a, NonLiteralPrimitive>, | ||
Not<IsLiteral<a>>, | ||
IsLiteral<b> | ||
]> extends true ? never : DeepExclude<a, b>; | ||
/** | ||
@@ -50,0 +54,0 @@ * ### InvertPatternForExclude |
{ | ||
"name": "ts-pattern", | ||
"version": "4.1.4-test.0", | ||
"version": "4.1.4", | ||
"description": " The exhaustive Pattern Matching library for TypeScript.", | ||
@@ -9,6 +9,6 @@ "type": "module", | ||
".": { | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.module.js", | ||
"types": "./dist/index.d.ts", | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.module.mjs", | ||
"default": "./dist/index.modern.mjs" | ||
"default": "./dist/index.modern.js" | ||
}, | ||
@@ -19,3 +19,3 @@ "./package.json": "./package.json" | ||
"types": "dist/index.d.ts", | ||
"module": "./dist/index.module.mjs", | ||
"module": "./dist/index.module.js", | ||
"unpkg": "./dist/index.umd.js", | ||
@@ -58,3 +58,3 @@ "scripts": { | ||
"jest": "^27.4.5", | ||
"microbundle": "^0.15.1", | ||
"microbundle": "^0.15.0", | ||
"prettier": "^2.5.1", | ||
@@ -61,0 +61,0 @@ "ts-jest": "^27.1.2", |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
327007
1318
0