typescanner
Advanced tools
Comparing version 0.3.3 to 0.3.4
import type { Condition } from "../types"; | ||
export declare const string: (value: unknown) => value is string; | ||
export declare const number: (value: unknown) => value is number; | ||
export declare const boolean: (value: unknown) => value is boolean; | ||
export declare const symbol: (value: unknown) => value is symbol; | ||
export declare const bigint: (value: unknown) => value is bigint; | ||
export declare const Undefined: (value: unknown) => value is undefined; | ||
export declare const Null: (value: unknown) => value is null; | ||
export declare const date: (value: unknown) => value is Date; | ||
export declare const string: Condition<string>; | ||
export declare const number: Condition<number>; | ||
export declare const boolean: Condition<boolean>; | ||
export declare const symbol: Condition<symbol>; | ||
export declare const bigint: Condition<bigint>; | ||
export declare const Undefined: Condition<undefined>; | ||
export declare const Null: Condition<null>; | ||
export declare const date: Condition<Date>; | ||
export declare const union: <T>(...conditions: Condition<T>[]) => Condition<T>[]; | ||
export declare const array: <T>(...conditions: Condition<T>[]) => (value: unknown) => value is T[]; | ||
export declare const optional: <T>(...conditions: Condition<T>[]) => (value: unknown) => value is T | undefined; | ||
export declare const list: <T>(array: Exclude<T[], never[]>) => (value: unknown) => value is T; | ||
export declare const instanceOf: <T>(constructor: new (...args: any[]) => T) => (value: unknown) => value is T; | ||
export declare const array: <T>(...conditions: Condition<T>[]) => Condition<T[]>; | ||
export declare const optional: <T>(...conditions: Condition<T>[]) => Condition<T | undefined>; | ||
export declare const list: <T>(array: Exclude<T[], never[]>) => Condition<T>; | ||
export declare const instanceOf: <T>(constructor: new (...args: any[]) => T) => Condition<T>; |
{ | ||
"name": "typescanner", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "A simple library for implementing type guard in TypeScript.", | ||
@@ -5,0 +5,0 @@ "author": "yona3", |
@@ -18,3 +18,3 @@ # typescanner | ||
```shell | ||
npm i -D typescanner | ||
npm i typescanner | ||
``` | ||
@@ -21,0 +21,0 @@ |
Sorry, the diff of this file is not supported yet
23114
21