-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathtypes.d.ts
More file actions
108 lines (93 loc) · 2.98 KB
/
types.d.ts
File metadata and controls
108 lines (93 loc) · 2.98 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/**
* @module "utils/types"
*/ /** */
/**
* A function that checks if something is a valid string.
* @param value The value which will be checked.
* Returns true if value is a string.
*/
export function isString(value: any): boolean;
/**
* A function that checks if something is a valid number.
* @param value The value which will be checked.
* Returns true if value is a number.
*/
export function isNumber(value: any): boolean;
/**
* A function that checks if something is a valid boolean.
* @param value The value which will be checked.
* Returns true if value is a boolean.
*/
export function isBoolean(value: any): boolean;
/**
* A function that checks if something is a function.
* @param value The value which will be checked.
* Returns true if value is a function.
*/
export function isFunction(value: any): boolean;
/**
* A function that checks if something is an object.
* @param value The value which will be checked.
* Returns true if value is an object.
*/
export function isObject(value: any): boolean;
/**
* A function that checks if something is "undefined".
* @param value The value which will be checked.
* Returns true if value is "undefined".
*/
export function isUndefined(value: any): boolean;
/**
* A function that checks if something is defined (not undefined).
* @param value The value which will be checked.
* Returns true if value is defined.
*/
export function isDefined(value: any): boolean;
/**
* A function that checks if something is not defined (null or undefined).
* @param value The value which will be checked.
* Returns true if value is null or undefined.
*/
export function isNullOrUndefined(value: any): boolean;
/**
* A function that checks if something is a valid function.
* @param value The value which will be checked.
* Throws exception if passed value is not a valid function.
*/
export function verifyCallback(value: any): void;
/**
* A function that gets the class name of an object.
* @param object The object which class will be get.
* Returns a string with the name of the class.
*/
export function getClass(object): string;
/**
* A function that gets the entire class hierarchy of an object.
* @param object The object which class hierarchy will be get.
* Return an array of strings with the name of all classes.
*/
export function getBaseClasses(object): Array<string>;
/**
* A function that gets the ClassInfo for an object.
* @param object The object for which the ClassInfo will be get.
* Returns a ClassInfo for the object.
*/
export function getClassInfo(object: Object): ClassInfo;
/**
* A Class holding information about a class
*/
export class ClassInfo {
/**
* Gets the name of the class.
*/
name: string;
/**
* Gets the ClassInfo for the base class of the current info.
*/
baseClassInfo: ClassInfo;
}
/**
* Returns a string representation of a string to be shown in UI.
* @param object The object which class hierarchy will be get.
*/
export function toUIString(object): string;