UNPKG

3.13 kBTypeScriptView Raw
1import { Primitive } from '@sentry/types';
2/**
3 * Checks whether given value's type is one of a few Error or Error-like
4 * {@link isError}.
5 *
6 * @param wat A value to be checked.
7 * @returns A boolean representing the result.
8 */
9export declare function isError(wat: any): boolean;
10/**
11 * Checks whether given value's type is ErrorEvent
12 * {@link isErrorEvent}.
13 *
14 * @param wat A value to be checked.
15 * @returns A boolean representing the result.
16 */
17export declare function isErrorEvent(wat: any): boolean;
18/**
19 * Checks whether given value's type is DOMError
20 * {@link isDOMError}.
21 *
22 * @param wat A value to be checked.
23 * @returns A boolean representing the result.
24 */
25export declare function isDOMError(wat: any): boolean;
26/**
27 * Checks whether given value's type is DOMException
28 * {@link isDOMException}.
29 *
30 * @param wat A value to be checked.
31 * @returns A boolean representing the result.
32 */
33export declare function isDOMException(wat: any): boolean;
34/**
35 * Checks whether given value's type is a string
36 * {@link isString}.
37 *
38 * @param wat A value to be checked.
39 * @returns A boolean representing the result.
40 */
41export declare function isString(wat: any): boolean;
42/**
43 * Checks whether given value's is a primitive (undefined, null, number, boolean, string, bigint, symbol)
44 * {@link isPrimitive}.
45 *
46 * @param wat A value to be checked.
47 * @returns A boolean representing the result.
48 */
49export declare function isPrimitive(wat: any): wat is Primitive;
50/**
51 * Checks whether given value's type is an object literal
52 * {@link isPlainObject}.
53 *
54 * @param wat A value to be checked.
55 * @returns A boolean representing the result.
56 */
57export declare function isPlainObject(wat: any): boolean;
58/**
59 * Checks whether given value's type is an Event instance
60 * {@link isEvent}.
61 *
62 * @param wat A value to be checked.
63 * @returns A boolean representing the result.
64 */
65export declare function isEvent(wat: any): boolean;
66/**
67 * Checks whether given value's type is an Element instance
68 * {@link isElement}.
69 *
70 * @param wat A value to be checked.
71 * @returns A boolean representing the result.
72 */
73export declare function isElement(wat: any): boolean;
74/**
75 * Checks whether given value's type is an regexp
76 * {@link isRegExp}.
77 *
78 * @param wat A value to be checked.
79 * @returns A boolean representing the result.
80 */
81export declare function isRegExp(wat: any): boolean;
82/**
83 * Checks whether given value has a then function.
84 * @param wat A value to be checked.
85 */
86export declare function isThenable(wat: any): boolean;
87/**
88 * Checks whether given value's type is a SyntheticEvent
89 * {@link isSyntheticEvent}.
90 *
91 * @param wat A value to be checked.
92 * @returns A boolean representing the result.
93 */
94export declare function isSyntheticEvent(wat: any): boolean;
95/**
96 * Checks whether given value's type is an instance of provided constructor.
97 * {@link isInstanceOf}.
98 *
99 * @param wat A value to be checked.
100 * @param base A constructor to be used in a check.
101 * @returns A boolean representing the result.
102 */
103export declare function isInstanceOf(wat: any, base: any): boolean;
104//# sourceMappingURL=is.d.ts.map
\No newline at end of file