-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
72 lines (64 loc) · 2.75 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
declare namespace is {
export type typeOf = (value: any) => boolean;
// Primitives
export function string(value: any): boolean;
export function number(value: any): boolean;
export function undefined(value: any): boolean;
export function boolean(value: any): boolean;
export function bool(value: any): boolean;
export function nullValue(value: any): boolean;
export function symbol(value: any): boolean;
export function bigint(value: any): boolean;
export function nullOrUndefined(value: any): boolean;
export function primitive(value: any): boolean;
// Functions
export function func(value: any): boolean;
export function generatorFunction(value: any): boolean;
export function asyncFunction(value: any): boolean;
export function boundFunction(value: any): boolean;
// Iterable & Generator
export function iterable(value: any): boolean;
export function asyncIterable(value: any): boolean;
export function generator(value: any): boolean;
// Objects
export function promise(value: any): boolean;
export function classObject(value: any): boolean;
export function array(value: any): boolean;
export function object(value: any): boolean;
export function plainObject(value: any): boolean;
export function set(value: any): boolean;
export function map(value: any): boolean;
export function set(value: any): boolean;
export function weakMap(value: any): boolean;
export function weakSet(value: any): boolean;
export function error(value: any): boolean;
export function date(value: any): boolean;
export function regExp(value: any): boolean;
// TypedArray & Buffers
export function typedArray(value: any): boolean;
export function buffer(value: any): boolean;
export function int8Array(value: any): boolean;
export function uint8Array(value: any): boolean;
export function uint8ClampedArray(value: any): boolean;
export function int16Array(value: any): boolean;
export function uint16Array(value: any): boolean;
export function int32Array(value: any): boolean;
export function uint32Array(value: any): boolean;
export function float32Array(value: any): boolean;
export function float64Array(value: any): boolean;
export function arrayBuffer(value: any): boolean;
export function sharedArrayBuffer(value: any): boolean;
export function dataView(value: any): boolean;
// Misc
export function falsy(value: any): boolean;
export function truthy(value: any): boolean;
export function nan(value: any): boolean;
export function integer(value: any): boolean;
export function directInstanceOf(instance: any, focus: any): boolean;
export function emptyString(value: string): boolean;
export namespace utils {
export function getObjectType(value: any): string;
}
}
export as namespace is;
export = is;