forked from NativeScript/NativeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.d.ts
More file actions
64 lines (56 loc) · 2.14 KB
/
types.d.ts
File metadata and controls
64 lines (56 loc) · 2.14 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
declare 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 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 "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>;
}