-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathindex.d.ts
55 lines (46 loc) · 1.29 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
declare module "typy" {
type SafeFunction = (...args: any[]) => any;
export function t (obj: any, nestedKeys?: string): Typy;
export function addCustomTypes(validators: {[key: string]: any}): any;
export default t;
interface SchemaType {
Number: number;
String: string;
Boolean: boolean;
Null: null;
Undefined: undefined;
Array: any[];
Function: () => void;
}
export const Schema: SchemaType;
class Typy {
t: (obj: any, nestedKeys?: string) => Typy
readonly isValid: boolean
readonly isDefined: boolean
readonly isUndefined: boolean
readonly isNull: boolean
readonly isNullOrUndefined: boolean
readonly isBoolean: boolean
readonly isTrue: boolean
readonly isFalse: boolean
readonly isTruthy: boolean
readonly isFalsy: boolean
readonly isObject: boolean
readonly isEmptyObject: boolean
readonly isString: boolean
readonly isEmptyString: boolean
readonly isNumber: boolean
readonly isArray: boolean
readonly isEmptyArray: boolean
readonly isFunction: boolean
readonly isDate: boolean
readonly isSymbol: boolean
readonly safeObject: any
readonly safeObjectOrEmpty: any
readonly safeString: string
readonly safeNumber: number
readonly safeBoolean: boolean
readonly safeFunction: SafeFunction
readonly safeArray: any[]
}
}