🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@vcsuite/check

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vcsuite/check - npm Package Compare versions

Comparing version

to
2.1.3

6

dist/index.d.ts

@@ -11,8 +11,6 @@ declare const matcherSymbol: unique symbol;

} | Matcher<any>;
export type PatternFor<T> = {
export type PatternFor<T extends object> = {
[k in keyof T]-?: Pattern;
};
export type PatternMatch<T extends Pattern> = T extends Matcher<infer U> ? U : T extends [Pattern] ? PatternMatch<T[0]>[] : T extends PatternFor<infer U> ? U extends Pattern ? PatternMatch<U> : {
[K in keyof U]: PatternMatch<T[K]>;
} : T extends typeof String ? string : T extends typeof Number ? number : T extends typeof Boolean ? boolean : T extends typeof Object ? object : T extends typeof Function ? Function : T extends undefined | null | string | number | boolean ? T : T extends new (...args: any[]) => infer U ? U : T extends {
export type PatternMatch<T extends Pattern> = T extends Matcher<infer U> ? U : T extends PatternFor<infer U> ? U : T extends typeof String ? string : T extends typeof Number ? number : T extends typeof Boolean ? boolean : T extends typeof Object ? object : T extends typeof Function ? Function : T extends undefined | null | string | number | boolean ? T : T extends new (...args: unknown[]) => infer U ? U : T extends [Pattern] ? PatternMatch<T[0]>[] : T extends {
[key: string]: Pattern;

@@ -19,0 +17,0 @@ } ? {

@@ -1,2 +0,1 @@

/* eslint-disable @typescript-eslint/no-explicit-any */
const matcherSymbol = Symbol('isMatcher');

@@ -3,0 +2,0 @@ export const Integer = Symbol('Integer');

{
"name": "@vcsuite/check",
"version": "2.1.2",
"version": "2.1.3",
"description": "check utilities for input type safety",

@@ -5,0 +5,0 @@ "main": "dist/index.js",