Socket
Socket
Sign inDemoInstall

ts-pattern

Package Overview
Dependencies
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-pattern - npm Package Compare versions

Comparing version 4.1.4-test.0 to 4.1.4

3

dist/types/helpers.d.ts

@@ -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;

8

dist/types/InvertPattern.d.ts
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc