@tspro/ts-utils-lib 1.20.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +27 -1
- package/dist/index.d.mts +405 -672
- package/dist/index.d.ts +405 -672
- package/dist/index.js +3343 -3969
- package/dist/index.mjs +3341 -3960
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -6,193 +6,108 @@ declare function getEnumValues<E extends EnumObject>(e: E): EnumValue<E>[];
|
|
|
6
6
|
declare function getEnumEntries<E extends EnumObject>(e: E): [keyof E, EnumValue<E>][];
|
|
7
7
|
declare function getEnumKey<E extends EnumObject>(e: E, value: EnumValue<E>): keyof E | undefined;
|
|
8
8
|
declare function forEachEnum<E extends EnumObject>(e: E, callback: (key: keyof E, value: E[keyof E]) => void): void;
|
|
9
|
-
declare function isEnumValue$2<E extends EnumObject>(e: E, value: unknown): value is EnumValue<E>;
|
|
10
|
-
declare function assertEnumValue<E extends EnumObject>(e: E, value: unknown): asserts value is EnumValue<E>;
|
|
11
9
|
|
|
12
10
|
type index$8_EnumKey<E extends EnumObject> = EnumKey<E>;
|
|
13
11
|
type index$8_EnumObject = EnumObject;
|
|
14
12
|
type index$8_EnumValue<E extends EnumObject> = EnumValue<E>;
|
|
15
|
-
declare const index$8_assertEnumValue: typeof assertEnumValue;
|
|
16
13
|
declare const index$8_forEachEnum: typeof forEachEnum;
|
|
17
14
|
declare const index$8_getEnumEntries: typeof getEnumEntries;
|
|
18
15
|
declare const index$8_getEnumKey: typeof getEnumKey;
|
|
19
16
|
declare const index$8_getEnumKeys: typeof getEnumKeys;
|
|
20
17
|
declare const index$8_getEnumValues: typeof getEnumValues;
|
|
21
18
|
declare namespace index$8 {
|
|
22
|
-
export { type index$8_EnumKey as EnumKey, type index$8_EnumObject as EnumObject, type index$8_EnumValue as EnumValue, index$
|
|
19
|
+
export { type index$8_EnumKey as EnumKey, type index$8_EnumObject as EnumObject, type index$8_EnumValue as EnumValue, index$8_forEachEnum as forEachEnum, index$8_getEnumEntries as getEnumEntries, index$8_getEnumKey as getEnumKey, index$8_getEnumKeys as getEnumKeys, index$8_getEnumValues as getEnumValues };
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
type ErrorConstructor = new (msg: string) => Error;
|
|
26
23
|
declare function setErrorClass(errorClass?: ErrorConstructor): void;
|
|
27
|
-
/**
|
|
28
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
29
|
-
* @private
|
|
30
|
-
*/
|
|
31
|
-
declare function interrupt(msg?: string): never;
|
|
32
|
-
/**
|
|
33
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
34
|
-
* @private
|
|
35
|
-
*/
|
|
36
|
-
declare function assertEnum<E extends EnumObject>(enumVal: unknown, enumObj: E, name?: string): asserts enumVal is E[keyof E];
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
39
|
-
* @private
|
|
40
|
-
*/
|
|
41
|
-
declare function int(value: unknown, msg?: string): number;
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
44
|
-
* @private
|
|
45
|
-
*/
|
|
46
|
-
declare function eq<T>(value1: T, value2: T, msg?: string): T;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
49
|
-
* @private
|
|
50
|
-
*/
|
|
51
|
-
declare function int_eq(value: unknown, compareTo: unknown, msg?: string): number;
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
54
|
-
* @private
|
|
55
|
-
*/
|
|
56
|
-
declare function int_lt(value: unknown, compareTo: unknown, msg?: string): number;
|
|
57
|
-
/**
|
|
58
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
59
|
-
* @private
|
|
60
|
-
*/
|
|
61
|
-
declare function int_lte(value: unknown, compareTo: unknown, msg?: string): number;
|
|
62
|
-
/**
|
|
63
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
64
|
-
* @private
|
|
65
|
-
*/
|
|
66
|
-
declare function int_gt(value: unknown, compareTo: unknown, msg?: string): number;
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
69
|
-
* @private
|
|
70
|
-
*/
|
|
71
|
-
declare function int_gte(value: unknown, compareTo: unknown, msg?: string): number;
|
|
72
|
-
/**
|
|
73
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
74
|
-
* @private
|
|
75
|
-
*/
|
|
76
|
-
declare function int_between(value: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
77
|
-
/**
|
|
78
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
79
|
-
* @private
|
|
80
|
-
*/
|
|
81
|
-
declare function int_between_exclusive(value: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
82
|
-
/**
|
|
83
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
84
|
-
* @private
|
|
85
|
-
*/
|
|
86
|
-
declare function odd(value: unknown, msg?: string): number;
|
|
87
|
-
/**
|
|
88
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
89
|
-
* @private
|
|
90
|
-
*/
|
|
91
|
-
declare function even(value: unknown, msg?: string): number;
|
|
92
|
-
/**
|
|
93
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
94
|
-
* @private
|
|
95
|
-
*/
|
|
96
|
-
declare function in_group<T>(value: T, group: ReadonlyArray<T>, msg?: string): T;
|
|
97
|
-
/**
|
|
98
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
99
|
-
* @private
|
|
100
|
-
*/
|
|
101
|
-
declare function finite(value: unknown, msg?: string): number;
|
|
102
|
-
/**
|
|
103
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
104
|
-
* @private
|
|
105
|
-
*/
|
|
106
|
-
declare function array_id<T>(array: Readonly<T[]>, index: unknown, msg?: string): number;
|
|
107
|
-
/**
|
|
108
|
-
* @deprecated - Wil be removed in v2.0.0.
|
|
109
|
-
* @private
|
|
110
|
-
*/
|
|
111
|
-
declare function array_elem<T>(array: Readonly<T[]>, index: number, msg?: string): T;
|
|
112
24
|
declare function assert<T>(condition: T, msg?: string): void;
|
|
113
|
-
declare function require<T>(
|
|
114
|
-
declare function requireDefined<T>(
|
|
25
|
+
declare function require<T>(val: T | null | undefined, msg?: string): T;
|
|
26
|
+
declare function requireDefined<T>(val: T | undefined, msg?: string): T;
|
|
27
|
+
declare function requireElement<E>(index: unknown, array: ReadonlyArray<E>, msg?: string): E;
|
|
115
28
|
declare function fail(msg?: string): never;
|
|
116
|
-
declare function
|
|
117
|
-
declare function isDeepEqual$1(
|
|
118
|
-
declare function isUndefined$1(
|
|
119
|
-
declare function isNull$1(
|
|
120
|
-
declare function isNullish$1(
|
|
121
|
-
declare function
|
|
122
|
-
declare function
|
|
123
|
-
declare function
|
|
124
|
-
declare function
|
|
125
|
-
declare function
|
|
126
|
-
declare function
|
|
127
|
-
declare function
|
|
128
|
-
declare function
|
|
129
|
-
declare function
|
|
130
|
-
declare function
|
|
131
|
-
declare function
|
|
132
|
-
declare function
|
|
133
|
-
declare function
|
|
134
|
-
declare function
|
|
135
|
-
declare function
|
|
136
|
-
declare function
|
|
137
|
-
declare function
|
|
138
|
-
declare function
|
|
139
|
-
declare function
|
|
140
|
-
declare function
|
|
141
|
-
declare function
|
|
142
|
-
declare function
|
|
143
|
-
declare function
|
|
144
|
-
declare function
|
|
145
|
-
declare function
|
|
146
|
-
declare function
|
|
147
|
-
declare function
|
|
148
|
-
declare function
|
|
149
|
-
declare function
|
|
150
|
-
declare function
|
|
151
|
-
declare function
|
|
152
|
-
declare function
|
|
153
|
-
declare function
|
|
154
|
-
declare function
|
|
155
|
-
declare function
|
|
156
|
-
declare function
|
|
157
|
-
declare function
|
|
158
|
-
declare function
|
|
159
|
-
declare function
|
|
160
|
-
declare function
|
|
161
|
-
declare function
|
|
162
|
-
declare function
|
|
163
|
-
declare function
|
|
164
|
-
declare function
|
|
165
|
-
declare function
|
|
166
|
-
declare function
|
|
167
|
-
declare function
|
|
168
|
-
declare function
|
|
169
|
-
declare function
|
|
29
|
+
declare function isStrictEqual$1<T = any>(val1: T, val2: unknown, msg?: string): T;
|
|
30
|
+
declare function isDeepEqual$1<T = any>(val1: T, val2: unknown, msg?: string): T;
|
|
31
|
+
declare function isUndefined$1(val: unknown, msg?: string): undefined;
|
|
32
|
+
declare function isNull$1(val: unknown, msg?: string): null;
|
|
33
|
+
declare function isNullish$1(val: unknown, msg?: string): null | undefined;
|
|
34
|
+
declare function isDefined$1<T>(val: T, msg?: string): Exclude<T, undefined>;
|
|
35
|
+
declare function isNonNull$1<T>(val: T, msg?: string): Exclude<T, null>;
|
|
36
|
+
declare function isObject$1(val: unknown, msg?: string): Record<string, unknown>;
|
|
37
|
+
declare function isEmptyObject$1(val: unknown, msg?: string): Record<string, unknown>;
|
|
38
|
+
declare function isPlainObject$1(val: unknown, msg?: string): Record<string, unknown>;
|
|
39
|
+
declare function isObjectOrUndefined$1(val: unknown, msg?: string): Record<string, unknown> | undefined;
|
|
40
|
+
declare function isTypedObject$1<T extends object>(val: unknown, keys: (keyof T)[], msg?: string): HasProps<T>;
|
|
41
|
+
declare function isArray$1<T>(val: unknown, msg?: string): T[];
|
|
42
|
+
declare function isArrayOrUndefined$1(val: unknown, msg?: string): val is unknown[] | undefined;
|
|
43
|
+
declare function isEmptyArray$1<T = any>(val: T[], msg?: string): asserts val is T[];
|
|
44
|
+
declare function isNonEmptyArray$1<T = any>(val: T[], msg?: string): asserts val is T[];
|
|
45
|
+
declare function isEmptyArrayOrUndefined$1<T = any>(val: unknown, msg?: string): asserts val is T[] | undefined;
|
|
46
|
+
declare function isNonEmptyArrayOrUndefined$1<T = any>(val: unknown, msg?: string): asserts val is T[] | undefined;
|
|
47
|
+
declare function isString$1(val: unknown, msg?: string): string;
|
|
48
|
+
declare function isEmptyString$1(val: unknown, msg?: string): "";
|
|
49
|
+
declare function isNonEmptyString$1(val: unknown, msg?: string): string;
|
|
50
|
+
declare function isStringOrUndefined$1(val: unknown, msg?: string): string | undefined;
|
|
51
|
+
declare function isEmptyStringOrUndefined$1(val: unknown, msg?: string): "" | undefined;
|
|
52
|
+
declare function isNonEmptyStringOrUndefined$1(val: unknown, msg?: string): string | undefined;
|
|
53
|
+
declare function isBoolean$1(val: unknown, msg?: string): boolean;
|
|
54
|
+
declare function isBooleanOrUndefined$1(val: unknown, msg?: string): boolean | undefined;
|
|
55
|
+
declare function isTrue$1(val: unknown, msg?: string): true;
|
|
56
|
+
declare function isTrueOrUndefined$1(val: unknown, msg?: string): true | undefined;
|
|
57
|
+
declare function isFalse$1(val: unknown, msg?: string): false;
|
|
58
|
+
declare function isFalseOrUndefined$1(val: unknown, msg?: string): false | undefined;
|
|
59
|
+
declare function isFunction$1<T extends (...args: any[]) => any>(val: unknown, msg?: string): T;
|
|
60
|
+
declare function isFunctionOrUndefined$1<T extends (...args: any[]) => any>(val: unknown, msg?: string): T | undefined;
|
|
61
|
+
declare function isEnumValue$1<E extends EnumObject>(val: unknown, enumObject: E, msg?: string): E[keyof E];
|
|
62
|
+
declare function isEnumValueOrUndefined$1<E extends EnumObject>(val: unknown, enumObject: E, msg?: string): E[keyof E] | undefined;
|
|
63
|
+
declare function isNumericString$1(val: unknown, msg?: string): string;
|
|
64
|
+
declare function isBigInt$1(val: unknown, msg?: string): BigInt;
|
|
65
|
+
declare function isNumber$1(val: unknown, msg?: string): number;
|
|
66
|
+
declare function isNumberOrUndefined$1(val: unknown, msg?: string): number | undefined;
|
|
67
|
+
declare function isFinite$1(val: unknown, msg?: string): number;
|
|
68
|
+
declare function isFloat$1(val: unknown, msg?: string): number;
|
|
69
|
+
declare function isInteger$1(val: unknown, msg?: string): number;
|
|
70
|
+
declare function isSafeInteger$1(val: unknown, msg?: string): number;
|
|
71
|
+
declare function isIntegerOrUndefined$1(val: unknown, msg?: string): number | undefined;
|
|
72
|
+
declare function isIntegerEq$1(val: unknown, ref: unknown, msg?: string): number;
|
|
73
|
+
declare function isIntegerGt$1(val: unknown, ref: unknown, msg?: string): number;
|
|
74
|
+
declare function isIntegerGte$1(val: unknown, ref: unknown, msg?: string): number;
|
|
75
|
+
declare function isIntegerLt$1(val: unknown, ref: unknown, msg?: string): number;
|
|
76
|
+
declare function isIntegerLte$1(val: unknown, ref: unknown, msg?: string): number;
|
|
77
|
+
declare function isIntegerBetween$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
78
|
+
declare function isIntegerBetweenExclusive$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
79
|
+
declare function isNumberBetween$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
80
|
+
declare function isNumberBetweenExclusive$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
81
|
+
declare function isNaNValue$1(val: unknown, msg?: string): number;
|
|
82
|
+
declare function isInfinity$1(val: unknown, msg?: string): number;
|
|
83
|
+
declare function isPosInfinity$1(val: unknown, msg?: string): number;
|
|
84
|
+
declare function isNegInfinity$1(val: unknown, msg?: string): number;
|
|
85
|
+
declare function isPos$1(val: unknown, msg?: string): number;
|
|
86
|
+
declare function isNeg$1(val: unknown, msg?: string): number;
|
|
87
|
+
declare function isNonPos$1(val: unknown, msg?: string): number;
|
|
88
|
+
declare function isNonNeg$1(val: unknown, msg?: string): number;
|
|
89
|
+
declare function isZero$1(val: unknown, msg?: string): number;
|
|
90
|
+
declare function isPosZero$1(val: unknown, msg?: string): number;
|
|
91
|
+
declare function isNegZero$1(val: unknown, msg?: string): number;
|
|
92
|
+
declare function isOdd$1(val: unknown, msg?: string): number;
|
|
93
|
+
declare function isEven$1(val: unknown, msg?: string): number;
|
|
94
|
+
declare function isMultipleOf$1(val: unknown, base: unknown, msg?: string): number;
|
|
95
|
+
declare function isPowerOfTwo$1(val: unknown, msg?: string): number;
|
|
96
|
+
declare function isIncluded$1<T>(val: unknown, arr: ReadonlyArray<T> | Set<T>, msg?: string): T;
|
|
97
|
+
declare function isIndex$1<T>(index: unknown, msg?: string): number;
|
|
98
|
+
declare function isIndex$1<T>(index: unknown, arr: ReadonlyArray<T>, msg?: string): number;
|
|
99
|
+
declare function doesThrow$1(throwTestFn: () => void, msg?: string): true;
|
|
100
|
+
declare function doesNotThrow$1(throwTestFn: () => void, msg?: string): true;
|
|
170
101
|
|
|
171
102
|
type index$7_ErrorConstructor = ErrorConstructor;
|
|
172
|
-
declare const index$7_array_elem: typeof array_elem;
|
|
173
|
-
declare const index$7_array_id: typeof array_id;
|
|
174
103
|
declare const index$7_assert: typeof assert;
|
|
175
|
-
declare const index$7_assertEnum: typeof assertEnum;
|
|
176
|
-
declare const index$7_eq: typeof eq;
|
|
177
|
-
declare const index$7_even: typeof even;
|
|
178
104
|
declare const index$7_fail: typeof fail;
|
|
179
|
-
declare const index$7_finite: typeof finite;
|
|
180
|
-
declare const index$7_in_group: typeof in_group;
|
|
181
|
-
declare const index$7_int: typeof int;
|
|
182
|
-
declare const index$7_int_between: typeof int_between;
|
|
183
|
-
declare const index$7_int_between_exclusive: typeof int_between_exclusive;
|
|
184
|
-
declare const index$7_int_eq: typeof int_eq;
|
|
185
|
-
declare const index$7_int_gt: typeof int_gt;
|
|
186
|
-
declare const index$7_int_gte: typeof int_gte;
|
|
187
|
-
declare const index$7_int_lt: typeof int_lt;
|
|
188
|
-
declare const index$7_int_lte: typeof int_lte;
|
|
189
|
-
declare const index$7_interrupt: typeof interrupt;
|
|
190
|
-
declare const index$7_odd: typeof odd;
|
|
191
105
|
declare const index$7_require: typeof require;
|
|
192
106
|
declare const index$7_requireDefined: typeof requireDefined;
|
|
107
|
+
declare const index$7_requireElement: typeof requireElement;
|
|
193
108
|
declare const index$7_setErrorClass: typeof setErrorClass;
|
|
194
109
|
declare namespace index$7 {
|
|
195
|
-
export { type index$7_ErrorConstructor as ErrorConstructor, index$
|
|
110
|
+
export { type index$7_ErrorConstructor as ErrorConstructor, index$7_assert as assert, doesNotThrow$1 as doesNotThrow, doesThrow$1 as doesThrow, index$7_fail as fail, isArray$1 as isArray, isArrayOrUndefined$1 as isArrayOrUndefined, isBigInt$1 as isBigInt, isBoolean$1 as isBoolean, isBooleanOrUndefined$1 as isBooleanOrUndefined, isDeepEqual$1 as isDeepEqual, isDefined$1 as isDefined, isEmptyArray$1 as isEmptyArray, isEmptyArrayOrUndefined$1 as isEmptyArrayOrUndefined, isEmptyObject$1 as isEmptyObject, isEmptyString$1 as isEmptyString, isEmptyStringOrUndefined$1 as isEmptyStringOrUndefined, isEnumValue$1 as isEnumValue, isEnumValueOrUndefined$1 as isEnumValueOrUndefined, isEven$1 as isEven, isFalse$1 as isFalse, isFalseOrUndefined$1 as isFalseOrUndefined, isFinite$1 as isFinite, isFloat$1 as isFloat, isFunction$1 as isFunction, isFunctionOrUndefined$1 as isFunctionOrUndefined, isIncluded$1 as isIncluded, isIndex$1 as isIndex, isInfinity$1 as isInfinity, isInteger$1 as isInteger, isIntegerBetween$1 as isIntegerBetween, isIntegerBetweenExclusive$1 as isIntegerBetweenExclusive, isIntegerEq$1 as isIntegerEq, isIntegerGt$1 as isIntegerGt, isIntegerGte$1 as isIntegerGte, isIntegerLt$1 as isIntegerLt, isIntegerLte$1 as isIntegerLte, isIntegerOrUndefined$1 as isIntegerOrUndefined, isMultipleOf$1 as isMultipleOf, isNaNValue$1 as isNaNValue, isNeg$1 as isNeg, isNegInfinity$1 as isNegInfinity, isNegZero$1 as isNegZero, isNonEmptyArray$1 as isNonEmptyArray, isNonEmptyArrayOrUndefined$1 as isNonEmptyArrayOrUndefined, isNonEmptyString$1 as isNonEmptyString, isNonEmptyStringOrUndefined$1 as isNonEmptyStringOrUndefined, isNonNeg$1 as isNonNeg, isNonNull$1 as isNonNull, isNonPos$1 as isNonPos, isNull$1 as isNull, isNullish$1 as isNullish, isNumber$1 as isNumber, isNumberBetween$1 as isNumberBetween, isNumberBetweenExclusive$1 as isNumberBetweenExclusive, isNumberOrUndefined$1 as isNumberOrUndefined, isNumericString$1 as isNumericString, isObject$1 as isObject, isObjectOrUndefined$1 as isObjectOrUndefined, isOdd$1 as isOdd, isPlainObject$1 as isPlainObject, isPos$1 as isPos, isPosInfinity$1 as isPosInfinity, isPosZero$1 as isPosZero, isPowerOfTwo$1 as isPowerOfTwo, isSafeInteger$1 as isSafeInteger, isStrictEqual$1 as isStrictEqual, isString$1 as isString, isStringOrUndefined$1 as isStringOrUndefined, isTrue$1 as isTrue, isTrueOrUndefined$1 as isTrueOrUndefined, isTypedObject$1 as isTypedObject, isUndefined$1 as isUndefined, isZero$1 as isZero, index$7_require as require, index$7_requireDefined as requireDefined, index$7_requireElement as requireElement, index$7_setErrorClass as setErrorClass };
|
|
196
111
|
}
|
|
197
112
|
|
|
198
113
|
/**
|
|
@@ -314,131 +229,162 @@ declare namespace device {
|
|
|
314
229
|
export { device_DPI as DPI, device_FontSize as FontSize, device_HostAddress as HostAddress, device_IsMobileDevice as IsMobileDevice, device_IsTouchDevice as IsTouchDevice, device_PxPerMm as PxPerMm, device_ScrollbarWidth as ScrollbarWidth, device_mmToPx as mmToPx, device_pxToMm as pxToMm, device_toPx as toPx };
|
|
315
230
|
}
|
|
316
231
|
|
|
317
|
-
declare function isEqual(value1: unknown, value2: unknown): boolean;
|
|
318
|
-
declare function isDeepEqual(value1: unknown, value2: unknown): boolean;
|
|
319
|
-
declare function isUndefined(value: unknown): value is undefined;
|
|
320
|
-
declare function isNull(value: unknown): value is null;
|
|
321
|
-
declare function isNullish(value: unknown): value is null | undefined;
|
|
322
|
-
declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
323
|
-
declare function isObjectOrUndefined(value: unknown): value is Record<string, unknown> | undefined;
|
|
324
232
|
type HasProps<T extends object> = T extends Record<string, unknown> ? T : never;
|
|
325
|
-
declare function
|
|
326
|
-
declare function
|
|
327
|
-
declare function
|
|
328
|
-
declare function
|
|
329
|
-
declare function
|
|
330
|
-
declare function
|
|
331
|
-
declare function
|
|
332
|
-
declare function
|
|
333
|
-
declare function
|
|
334
|
-
declare function
|
|
335
|
-
declare function
|
|
336
|
-
declare function
|
|
337
|
-
declare function
|
|
338
|
-
declare function
|
|
339
|
-
declare function
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
declare function
|
|
343
|
-
declare function
|
|
344
|
-
declare function
|
|
345
|
-
declare function
|
|
346
|
-
declare function
|
|
347
|
-
declare function
|
|
348
|
-
declare function
|
|
349
|
-
declare function
|
|
350
|
-
declare function
|
|
351
|
-
declare function
|
|
352
|
-
declare function
|
|
353
|
-
declare function
|
|
354
|
-
declare function
|
|
355
|
-
declare function
|
|
356
|
-
declare function
|
|
357
|
-
declare function
|
|
358
|
-
declare function
|
|
359
|
-
declare function
|
|
360
|
-
declare function
|
|
361
|
-
declare function
|
|
362
|
-
declare function
|
|
363
|
-
declare function
|
|
364
|
-
declare function
|
|
365
|
-
declare function
|
|
366
|
-
declare function
|
|
367
|
-
declare function
|
|
368
|
-
declare function
|
|
369
|
-
declare function
|
|
370
|
-
declare function
|
|
371
|
-
declare function
|
|
233
|
+
declare function isStrictEqual(val1: unknown, val2: unknown): boolean;
|
|
234
|
+
declare function isDeepEqual(val1: unknown, val2: unknown): boolean;
|
|
235
|
+
declare function isUndefined(val: unknown): val is undefined;
|
|
236
|
+
declare function isNull(val: unknown): val is null;
|
|
237
|
+
declare function isNullish(val: unknown): val is null | undefined;
|
|
238
|
+
declare function isDefined<T>(val: T): val is Exclude<T, undefined>;
|
|
239
|
+
declare function isNonNull<T>(val: T): val is Exclude<T, null>;
|
|
240
|
+
declare function isObject(val: unknown): val is Record<string, unknown>;
|
|
241
|
+
declare function isEmptyObject(val: unknown): val is Record<string, never>;
|
|
242
|
+
declare function isObjectOrUndefined(val: unknown): val is Record<string, unknown> | undefined;
|
|
243
|
+
declare function isPlainObject(val: unknown): val is Record<string, unknown>;
|
|
244
|
+
declare function isTypedObject<T extends object>(val: unknown, keys: (keyof T)[]): val is HasProps<T>;
|
|
245
|
+
declare function isArray<T>(arr: T[] | unknown): arr is T[];
|
|
246
|
+
declare function isArrayOrUndefined(arr: unknown): arr is unknown[] | undefined;
|
|
247
|
+
declare function isEmptyArray<T>(arr: T[] | unknown): arr is T[] & {
|
|
248
|
+
length: 0;
|
|
249
|
+
};
|
|
250
|
+
declare function isNonEmptyArray<T>(arr: T[] | unknown): arr is T[];
|
|
251
|
+
declare function isEmptyArrayOrUndefined<T>(arr: T[] | unknown): arr is T[] | undefined;
|
|
252
|
+
declare function isNonEmptyArrayOrUndefined<T>(arr: T[] | unknown): arr is T[] | undefined;
|
|
253
|
+
declare function isString(val: unknown): val is string;
|
|
254
|
+
declare function isEmptyString(val: unknown): val is "";
|
|
255
|
+
declare function isNonEmptyString(val: unknown): val is string;
|
|
256
|
+
declare function isStringOrUndefined(val: unknown): val is string | undefined;
|
|
257
|
+
declare function isEmptyStringOrUndefined(val: unknown): val is "" | undefined;
|
|
258
|
+
declare function isNonEmptyStringOrUndefined(val: unknown): val is string | undefined;
|
|
259
|
+
declare function isBoolean(val: unknown): val is boolean;
|
|
260
|
+
declare function isBooleanOrUndefined(val: unknown): val is boolean | undefined;
|
|
261
|
+
declare function isTrue(val: unknown): val is true;
|
|
262
|
+
declare function isTrueOrUndefined(val: unknown): val is true | undefined;
|
|
263
|
+
declare function isFalse(val: unknown): val is false;
|
|
264
|
+
declare function isFalseOrUndefined(val: unknown): val is false | undefined;
|
|
265
|
+
declare function isFunction<T extends (...args: any[]) => any>(val: unknown): val is T;
|
|
266
|
+
declare function isFunctionOrUndefined(val: unknown): val is ((...args: any[]) => any) | undefined;
|
|
267
|
+
declare function isEnumValue<E extends EnumObject>(val: unknown, enumObj: E): val is E[keyof E];
|
|
268
|
+
declare function isEnumValueOrUndefined<E extends EnumObject>(val: unknown, enumObj: E): val is E[keyof E] | undefined;
|
|
269
|
+
declare function isNumericString(val: unknown): val is string;
|
|
270
|
+
declare function isBigInt(val: unknown): val is BigInt;
|
|
271
|
+
declare function isNumber(val: unknown): val is number;
|
|
272
|
+
declare function isNumberOrUndefined(val: unknown): val is number | undefined;
|
|
273
|
+
declare function isFinite(val: unknown): val is number;
|
|
274
|
+
declare function isFloat(val: unknown): val is number;
|
|
275
|
+
declare function isInteger(val: unknown): val is number;
|
|
276
|
+
declare function isSafeInteger(val: unknown): val is number;
|
|
277
|
+
declare function isIntegerOrUndefined(val: unknown): val is number | undefined;
|
|
278
|
+
declare function isIntegerEq(val: unknown, ref: unknown): val is number;
|
|
279
|
+
declare function isIntegerGt(val: unknown, ref: unknown): val is number;
|
|
280
|
+
declare function isIntegerGte(val: unknown, ref: unknown): val is number;
|
|
281
|
+
declare function isIntegerLt(val: unknown, ref: unknown): val is number;
|
|
282
|
+
declare function isIntegerLte(val: unknown, ref: unknown): val is number;
|
|
283
|
+
declare function isIntegerBetween(val: unknown, min: unknown, max: unknown): val is number;
|
|
284
|
+
declare function isIntegerBetweenExclusive(val: unknown, min: unknown, max: unknown): val is number;
|
|
285
|
+
declare function isNumberBetween(val: unknown, min: unknown, max: unknown): val is number;
|
|
286
|
+
declare function isNumberBetweenExclusive(val: unknown, min: unknown, max: unknown): val is number;
|
|
287
|
+
declare function isNaNValue(val: unknown): val is number;
|
|
288
|
+
declare function isInfinity(val: unknown): val is number;
|
|
289
|
+
declare function isPosInfinity(val: unknown): val is number;
|
|
290
|
+
declare function isNegInfinity(val: unknown): val is number;
|
|
291
|
+
declare function isPos(val: unknown): val is number;
|
|
292
|
+
declare function isNeg(val: unknown): val is number;
|
|
293
|
+
declare function isNonPos(val: unknown): val is number;
|
|
294
|
+
declare function isNonNeg(val: unknown): val is number;
|
|
295
|
+
declare function isZero(val: unknown): val is number;
|
|
296
|
+
declare function isPosZero(val: unknown): val is number;
|
|
297
|
+
declare function isNegZero(val: unknown): val is number;
|
|
298
|
+
declare function isOdd(val: unknown): val is number;
|
|
299
|
+
declare function isEven(val: unknown): val is number;
|
|
300
|
+
declare function isMultipleOf(val: unknown, base: unknown): val is number;
|
|
301
|
+
declare function isPowerOfTwo(val: unknown): val is number;
|
|
302
|
+
declare function isIncluded<T>(val: unknown, container: ReadonlyArray<T> | Set<T>): val is T;
|
|
303
|
+
declare function isIndex<T>(index: unknown, array?: ReadonlyArray<T>): index is number;
|
|
304
|
+
declare function doesThrow(throwTestFn: () => void): boolean;
|
|
305
|
+
declare function doesNotThrow(throwTestFn: () => void): boolean;
|
|
372
306
|
declare function tryOr<TRY_RVAL, OR_RVAL>(tryFn: () => TRY_RVAL, orVal: OR_RVAL | (() => OR_RVAL)): TRY_RVAL | OR_RVAL;
|
|
373
307
|
|
|
374
|
-
type
|
|
375
|
-
declare const
|
|
376
|
-
declare const
|
|
377
|
-
declare const
|
|
378
|
-
declare const
|
|
379
|
-
declare const
|
|
380
|
-
declare const
|
|
381
|
-
declare const
|
|
382
|
-
declare const
|
|
383
|
-
declare const
|
|
384
|
-
declare const
|
|
385
|
-
declare const
|
|
386
|
-
declare const
|
|
387
|
-
declare const
|
|
388
|
-
declare const
|
|
389
|
-
declare const
|
|
390
|
-
declare const
|
|
391
|
-
declare const
|
|
392
|
-
declare const
|
|
393
|
-
declare const
|
|
394
|
-
declare const
|
|
395
|
-
declare const
|
|
396
|
-
declare const
|
|
397
|
-
declare const
|
|
398
|
-
declare const
|
|
399
|
-
declare const
|
|
400
|
-
declare const
|
|
401
|
-
declare const
|
|
402
|
-
declare const
|
|
403
|
-
declare const
|
|
404
|
-
declare const
|
|
405
|
-
declare const
|
|
406
|
-
declare const
|
|
407
|
-
declare const
|
|
408
|
-
declare const
|
|
409
|
-
declare const
|
|
410
|
-
declare const
|
|
411
|
-
declare const
|
|
412
|
-
declare const
|
|
413
|
-
declare const
|
|
414
|
-
declare const
|
|
415
|
-
declare const
|
|
416
|
-
declare const
|
|
417
|
-
declare const
|
|
418
|
-
declare const
|
|
419
|
-
declare const
|
|
420
|
-
declare const
|
|
421
|
-
declare const
|
|
422
|
-
declare const
|
|
423
|
-
declare const
|
|
424
|
-
declare const
|
|
425
|
-
declare const
|
|
426
|
-
declare const
|
|
427
|
-
declare const
|
|
428
|
-
declare const
|
|
429
|
-
declare const
|
|
430
|
-
declare
|
|
431
|
-
|
|
308
|
+
type index$6_HasProps<T extends object> = HasProps<T>;
|
|
309
|
+
declare const index$6_doesNotThrow: typeof doesNotThrow;
|
|
310
|
+
declare const index$6_doesThrow: typeof doesThrow;
|
|
311
|
+
declare const index$6_isArray: typeof isArray;
|
|
312
|
+
declare const index$6_isArrayOrUndefined: typeof isArrayOrUndefined;
|
|
313
|
+
declare const index$6_isBigInt: typeof isBigInt;
|
|
314
|
+
declare const index$6_isBoolean: typeof isBoolean;
|
|
315
|
+
declare const index$6_isBooleanOrUndefined: typeof isBooleanOrUndefined;
|
|
316
|
+
declare const index$6_isDeepEqual: typeof isDeepEqual;
|
|
317
|
+
declare const index$6_isDefined: typeof isDefined;
|
|
318
|
+
declare const index$6_isEmptyArray: typeof isEmptyArray;
|
|
319
|
+
declare const index$6_isEmptyArrayOrUndefined: typeof isEmptyArrayOrUndefined;
|
|
320
|
+
declare const index$6_isEmptyObject: typeof isEmptyObject;
|
|
321
|
+
declare const index$6_isEmptyString: typeof isEmptyString;
|
|
322
|
+
declare const index$6_isEmptyStringOrUndefined: typeof isEmptyStringOrUndefined;
|
|
323
|
+
declare const index$6_isEnumValue: typeof isEnumValue;
|
|
324
|
+
declare const index$6_isEnumValueOrUndefined: typeof isEnumValueOrUndefined;
|
|
325
|
+
declare const index$6_isEven: typeof isEven;
|
|
326
|
+
declare const index$6_isFalse: typeof isFalse;
|
|
327
|
+
declare const index$6_isFalseOrUndefined: typeof isFalseOrUndefined;
|
|
328
|
+
declare const index$6_isFinite: typeof isFinite;
|
|
329
|
+
declare const index$6_isFloat: typeof isFloat;
|
|
330
|
+
declare const index$6_isFunction: typeof isFunction;
|
|
331
|
+
declare const index$6_isFunctionOrUndefined: typeof isFunctionOrUndefined;
|
|
332
|
+
declare const index$6_isIncluded: typeof isIncluded;
|
|
333
|
+
declare const index$6_isIndex: typeof isIndex;
|
|
334
|
+
declare const index$6_isInfinity: typeof isInfinity;
|
|
335
|
+
declare const index$6_isInteger: typeof isInteger;
|
|
336
|
+
declare const index$6_isIntegerBetween: typeof isIntegerBetween;
|
|
337
|
+
declare const index$6_isIntegerBetweenExclusive: typeof isIntegerBetweenExclusive;
|
|
338
|
+
declare const index$6_isIntegerEq: typeof isIntegerEq;
|
|
339
|
+
declare const index$6_isIntegerGt: typeof isIntegerGt;
|
|
340
|
+
declare const index$6_isIntegerGte: typeof isIntegerGte;
|
|
341
|
+
declare const index$6_isIntegerLt: typeof isIntegerLt;
|
|
342
|
+
declare const index$6_isIntegerLte: typeof isIntegerLte;
|
|
343
|
+
declare const index$6_isIntegerOrUndefined: typeof isIntegerOrUndefined;
|
|
344
|
+
declare const index$6_isMultipleOf: typeof isMultipleOf;
|
|
345
|
+
declare const index$6_isNaNValue: typeof isNaNValue;
|
|
346
|
+
declare const index$6_isNeg: typeof isNeg;
|
|
347
|
+
declare const index$6_isNegInfinity: typeof isNegInfinity;
|
|
348
|
+
declare const index$6_isNegZero: typeof isNegZero;
|
|
349
|
+
declare const index$6_isNonEmptyArray: typeof isNonEmptyArray;
|
|
350
|
+
declare const index$6_isNonEmptyArrayOrUndefined: typeof isNonEmptyArrayOrUndefined;
|
|
351
|
+
declare const index$6_isNonEmptyString: typeof isNonEmptyString;
|
|
352
|
+
declare const index$6_isNonEmptyStringOrUndefined: typeof isNonEmptyStringOrUndefined;
|
|
353
|
+
declare const index$6_isNonNeg: typeof isNonNeg;
|
|
354
|
+
declare const index$6_isNonNull: typeof isNonNull;
|
|
355
|
+
declare const index$6_isNonPos: typeof isNonPos;
|
|
356
|
+
declare const index$6_isNull: typeof isNull;
|
|
357
|
+
declare const index$6_isNullish: typeof isNullish;
|
|
358
|
+
declare const index$6_isNumber: typeof isNumber;
|
|
359
|
+
declare const index$6_isNumberBetween: typeof isNumberBetween;
|
|
360
|
+
declare const index$6_isNumberBetweenExclusive: typeof isNumberBetweenExclusive;
|
|
361
|
+
declare const index$6_isNumberOrUndefined: typeof isNumberOrUndefined;
|
|
362
|
+
declare const index$6_isNumericString: typeof isNumericString;
|
|
363
|
+
declare const index$6_isObject: typeof isObject;
|
|
364
|
+
declare const index$6_isObjectOrUndefined: typeof isObjectOrUndefined;
|
|
365
|
+
declare const index$6_isOdd: typeof isOdd;
|
|
366
|
+
declare const index$6_isPlainObject: typeof isPlainObject;
|
|
367
|
+
declare const index$6_isPos: typeof isPos;
|
|
368
|
+
declare const index$6_isPosInfinity: typeof isPosInfinity;
|
|
369
|
+
declare const index$6_isPosZero: typeof isPosZero;
|
|
370
|
+
declare const index$6_isPowerOfTwo: typeof isPowerOfTwo;
|
|
371
|
+
declare const index$6_isSafeInteger: typeof isSafeInteger;
|
|
372
|
+
declare const index$6_isStrictEqual: typeof isStrictEqual;
|
|
373
|
+
declare const index$6_isString: typeof isString;
|
|
374
|
+
declare const index$6_isStringOrUndefined: typeof isStringOrUndefined;
|
|
375
|
+
declare const index$6_isTrue: typeof isTrue;
|
|
376
|
+
declare const index$6_isTrueOrUndefined: typeof isTrueOrUndefined;
|
|
377
|
+
declare const index$6_isTypedObject: typeof isTypedObject;
|
|
378
|
+
declare const index$6_isUndefined: typeof isUndefined;
|
|
379
|
+
declare const index$6_isZero: typeof isZero;
|
|
380
|
+
declare const index$6_tryOr: typeof tryOr;
|
|
381
|
+
declare namespace index$6 {
|
|
382
|
+
export { type index$6_HasProps as HasProps, index$6_doesNotThrow as doesNotThrow, index$6_doesThrow as doesThrow, index$6_isArray as isArray, index$6_isArrayOrUndefined as isArrayOrUndefined, index$6_isBigInt as isBigInt, index$6_isBoolean as isBoolean, index$6_isBooleanOrUndefined as isBooleanOrUndefined, index$6_isDeepEqual as isDeepEqual, index$6_isDefined as isDefined, index$6_isEmptyArray as isEmptyArray, index$6_isEmptyArrayOrUndefined as isEmptyArrayOrUndefined, index$6_isEmptyObject as isEmptyObject, index$6_isEmptyString as isEmptyString, index$6_isEmptyStringOrUndefined as isEmptyStringOrUndefined, index$6_isEnumValue as isEnumValue, index$6_isEnumValueOrUndefined as isEnumValueOrUndefined, index$6_isEven as isEven, index$6_isFalse as isFalse, index$6_isFalseOrUndefined as isFalseOrUndefined, index$6_isFinite as isFinite, index$6_isFloat as isFloat, index$6_isFunction as isFunction, index$6_isFunctionOrUndefined as isFunctionOrUndefined, index$6_isIncluded as isIncluded, index$6_isIndex as isIndex, index$6_isInfinity as isInfinity, index$6_isInteger as isInteger, index$6_isIntegerBetween as isIntegerBetween, index$6_isIntegerBetweenExclusive as isIntegerBetweenExclusive, index$6_isIntegerEq as isIntegerEq, index$6_isIntegerGt as isIntegerGt, index$6_isIntegerGte as isIntegerGte, index$6_isIntegerLt as isIntegerLt, index$6_isIntegerLte as isIntegerLte, index$6_isIntegerOrUndefined as isIntegerOrUndefined, index$6_isMultipleOf as isMultipleOf, index$6_isNaNValue as isNaNValue, index$6_isNeg as isNeg, index$6_isNegInfinity as isNegInfinity, index$6_isNegZero as isNegZero, index$6_isNonEmptyArray as isNonEmptyArray, index$6_isNonEmptyArrayOrUndefined as isNonEmptyArrayOrUndefined, index$6_isNonEmptyString as isNonEmptyString, index$6_isNonEmptyStringOrUndefined as isNonEmptyStringOrUndefined, index$6_isNonNeg as isNonNeg, index$6_isNonNull as isNonNull, index$6_isNonPos as isNonPos, index$6_isNull as isNull, index$6_isNullish as isNullish, index$6_isNumber as isNumber, index$6_isNumberBetween as isNumberBetween, index$6_isNumberBetweenExclusive as isNumberBetweenExclusive, index$6_isNumberOrUndefined as isNumberOrUndefined, index$6_isNumericString as isNumericString, index$6_isObject as isObject, index$6_isObjectOrUndefined as isObjectOrUndefined, index$6_isOdd as isOdd, index$6_isPlainObject as isPlainObject, index$6_isPos as isPos, index$6_isPosInfinity as isPosInfinity, index$6_isPosZero as isPosZero, index$6_isPowerOfTwo as isPowerOfTwo, index$6_isSafeInteger as isSafeInteger, index$6_isStrictEqual as isStrictEqual, index$6_isString as isString, index$6_isStringOrUndefined as isStringOrUndefined, index$6_isTrue as isTrue, index$6_isTrueOrUndefined as isTrueOrUndefined, index$6_isTypedObject as isTypedObject, index$6_isUndefined as isUndefined, index$6_isZero as isZero, index$6_tryOr as tryOr };
|
|
432
383
|
}
|
|
433
384
|
|
|
434
|
-
declare function toArray<T>(a: T | T[]):
|
|
435
|
-
declare function duplicate<T>(a: T
|
|
436
|
-
declare function removeDuplicates<T>(arr: T
|
|
437
|
-
/**
|
|
438
|
-
* @deprecated - Use {@link removeDuplicates} with compareFn instead. Will be removed in v2.0.0.
|
|
439
|
-
* @private
|
|
440
|
-
*/
|
|
441
|
-
declare function removeDuplicatesCmp<T>(arr: ReadonlyArray<T>, compareFn: (t1: T, t2: T) => boolean): T[];
|
|
385
|
+
declare function toArray<T>(a: T | T[]): T[];
|
|
386
|
+
declare function duplicate<T>(a: ReadonlyArray<T> | undefined): T[];
|
|
387
|
+
declare function removeDuplicates<T>(arr: ReadonlyArray<T>, compareFn?: (a: T, b: T) => boolean): Array<T>;
|
|
442
388
|
declare function fillArray<T>(fillValue: T, fillCount: number): T[];
|
|
443
389
|
declare function mapSequenceArray<T>(len: number, fn: (i: number) => T): T[];
|
|
444
390
|
declare function getSequenceArray(len: number): number[];
|
|
@@ -447,20 +393,19 @@ declare function getRangeArray(start: number, end: number): number[];
|
|
|
447
393
|
declare function arrayContains<T extends unknown>(arg: T[], item: T): boolean;
|
|
448
394
|
declare function chunckArray<A>(arr: ReadonlyArray<A>, chunckSize: number): A[][];
|
|
449
395
|
|
|
450
|
-
declare const index$
|
|
451
|
-
declare const index$
|
|
452
|
-
declare const index$
|
|
453
|
-
declare const index$
|
|
454
|
-
declare const index$
|
|
455
|
-
declare const index$
|
|
456
|
-
declare const index$
|
|
457
|
-
declare const index$
|
|
458
|
-
declare const index$
|
|
459
|
-
declare const index$
|
|
460
|
-
declare const index$
|
|
461
|
-
declare
|
|
462
|
-
|
|
463
|
-
export { index$6_arrayContains as arrayContains, index$6_chunckArray as chunckArray, index$6_duplicate as duplicate, index$6_fillArray as fillArray, index$6_getRangeArray as getRangeArray, index$6_getSequenceArray as getSequenceArray, index$6_isArray as isArray, index$6_mapRangeArray as mapRangeArray, index$6_mapSequenceArray as mapSequenceArray, index$6_removeDuplicates as removeDuplicates, index$6_removeDuplicatesCmp as removeDuplicatesCmp, index$6_toArray as toArray };
|
|
396
|
+
declare const index$5_arrayContains: typeof arrayContains;
|
|
397
|
+
declare const index$5_chunckArray: typeof chunckArray;
|
|
398
|
+
declare const index$5_duplicate: typeof duplicate;
|
|
399
|
+
declare const index$5_fillArray: typeof fillArray;
|
|
400
|
+
declare const index$5_getRangeArray: typeof getRangeArray;
|
|
401
|
+
declare const index$5_getSequenceArray: typeof getSequenceArray;
|
|
402
|
+
declare const index$5_isArray: typeof isArray;
|
|
403
|
+
declare const index$5_mapRangeArray: typeof mapRangeArray;
|
|
404
|
+
declare const index$5_mapSequenceArray: typeof mapSequenceArray;
|
|
405
|
+
declare const index$5_removeDuplicates: typeof removeDuplicates;
|
|
406
|
+
declare const index$5_toArray: typeof toArray;
|
|
407
|
+
declare namespace index$5 {
|
|
408
|
+
export { index$5_arrayContains as arrayContains, index$5_chunckArray as chunckArray, index$5_duplicate as duplicate, index$5_fillArray as fillArray, index$5_getRangeArray as getRangeArray, index$5_getSequenceArray as getSequenceArray, index$5_isArray as isArray, index$5_mapRangeArray as mapRangeArray, index$5_mapSequenceArray as mapSequenceArray, index$5_removeDuplicates as removeDuplicates, index$5_toArray as toArray };
|
|
464
409
|
}
|
|
465
410
|
|
|
466
411
|
interface CSSProperties {
|
|
@@ -509,35 +454,28 @@ declare function getDimension(style?: CSSProperties): {
|
|
|
509
454
|
declare function styleLayoutChanged(style1?: CSSProperties, style2?: CSSProperties): boolean;
|
|
510
455
|
declare function getCanvasTextWidth(text: string, font: string): number;
|
|
511
456
|
|
|
512
|
-
type index$
|
|
513
|
-
declare const index$
|
|
514
|
-
declare const index$
|
|
515
|
-
declare const index$
|
|
516
|
-
declare const index$
|
|
517
|
-
declare const index$
|
|
518
|
-
declare const index$
|
|
519
|
-
declare const index$
|
|
520
|
-
declare const index$
|
|
521
|
-
declare const index$
|
|
522
|
-
declare const index$
|
|
523
|
-
declare const index$
|
|
524
|
-
declare const index$
|
|
525
|
-
declare const index$
|
|
526
|
-
declare const index$
|
|
527
|
-
declare const index$
|
|
528
|
-
declare const index$
|
|
529
|
-
declare const index$
|
|
530
|
-
declare const index$
|
|
531
|
-
declare const index$
|
|
532
|
-
declare namespace index$5 {
|
|
533
|
-
export { type index$5_CSSProperties as CSSProperties, index$5_addClass as addClass, index$5_appendTo as appendTo, index$5_getButton as getButton, index$5_getCanvas as getCanvas, index$5_getCanvasTextWidth as getCanvasTextWidth, index$5_getDimension as getDimension, index$5_getHeight as getHeight, index$5_getOffset as getOffset, index$5_getPadding as getPadding, index$5_getWidth as getWidth, index$5_hasClass as hasClass, index$5_removeClass as removeClass, index$5_removeFromParent as removeFromParent, index$5_setHeight as setHeight, index$5_setOffset as setOffset, index$5_setRect as setRect, index$5_setVisibility as setVisibility, index$5_setWidth as setWidth, index$5_styleLayoutChanged as styleLayoutChanged };
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
declare function getMapKeys<K, V>(map: Map<K, V>): K[];
|
|
537
|
-
|
|
538
|
-
declare const index$4_getMapKeys: typeof getMapKeys;
|
|
457
|
+
type index$4_CSSProperties = CSSProperties;
|
|
458
|
+
declare const index$4_addClass: typeof addClass;
|
|
459
|
+
declare const index$4_appendTo: typeof appendTo;
|
|
460
|
+
declare const index$4_getButton: typeof getButton;
|
|
461
|
+
declare const index$4_getCanvas: typeof getCanvas;
|
|
462
|
+
declare const index$4_getCanvasTextWidth: typeof getCanvasTextWidth;
|
|
463
|
+
declare const index$4_getDimension: typeof getDimension;
|
|
464
|
+
declare const index$4_getHeight: typeof getHeight;
|
|
465
|
+
declare const index$4_getOffset: typeof getOffset;
|
|
466
|
+
declare const index$4_getPadding: typeof getPadding;
|
|
467
|
+
declare const index$4_getWidth: typeof getWidth;
|
|
468
|
+
declare const index$4_hasClass: typeof hasClass;
|
|
469
|
+
declare const index$4_removeClass: typeof removeClass;
|
|
470
|
+
declare const index$4_removeFromParent: typeof removeFromParent;
|
|
471
|
+
declare const index$4_setHeight: typeof setHeight;
|
|
472
|
+
declare const index$4_setOffset: typeof setOffset;
|
|
473
|
+
declare const index$4_setRect: typeof setRect;
|
|
474
|
+
declare const index$4_setVisibility: typeof setVisibility;
|
|
475
|
+
declare const index$4_setWidth: typeof setWidth;
|
|
476
|
+
declare const index$4_styleLayoutChanged: typeof styleLayoutChanged;
|
|
539
477
|
declare namespace index$4 {
|
|
540
|
-
export { index$
|
|
478
|
+
export { type index$4_CSSProperties as CSSProperties, index$4_addClass as addClass, index$4_appendTo as appendTo, index$4_getButton as getButton, index$4_getCanvas as getCanvas, index$4_getCanvasTextWidth as getCanvasTextWidth, index$4_getDimension as getDimension, index$4_getHeight as getHeight, index$4_getOffset as getOffset, index$4_getPadding as getPadding, index$4_getWidth as getWidth, index$4_hasClass as hasClass, index$4_removeClass as removeClass, index$4_removeFromParent as removeFromParent, index$4_setHeight as setHeight, index$4_setOffset as setOffset, index$4_setRect as setRect, index$4_setVisibility as setVisibility, index$4_setWidth as setWidth, index$4_styleLayoutChanged as styleLayoutChanged };
|
|
541
479
|
}
|
|
542
480
|
|
|
543
481
|
declare function linearToDecibels(linearVolume: number): number;
|
|
@@ -580,11 +518,13 @@ declare namespace index$3 {
|
|
|
580
518
|
}
|
|
581
519
|
|
|
582
520
|
/**
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
521
|
+
* ```ts
|
|
522
|
+
* // Gives type Record<string, unknown>
|
|
523
|
+
* hasProperties(obj, ["a", "b"]);
|
|
524
|
+
*
|
|
525
|
+
* // Gives type Record<"a" | "b", unknown>
|
|
526
|
+
* hasProperties(obj, ["a", "b"] as const);
|
|
527
|
+
* ```
|
|
588
528
|
*/
|
|
589
529
|
declare function hasProperties<T extends readonly string[]>(obj: unknown, props: T | string[]): obj is Record<T[number], unknown>;
|
|
590
530
|
declare function deepEqual<T>(a: T, b: T): boolean;
|
|
@@ -664,15 +604,8 @@ declare namespace index$1 {
|
|
|
664
604
|
export { index$1_charCount as charCount, index$1_chunkString as chunkString, index$1_insertAt as insertAt, index$1_isString as isString, index$1_makeSentenceFromPascal as makeSentenceFromPascal, index$1_removeAt as removeAt, index$1_repeatString as repeatString, index$1_replaceAt as replaceAt, index$1_stringify as stringify, index$1_toCharArray as toCharArray };
|
|
665
605
|
}
|
|
666
606
|
|
|
667
|
-
/**
|
|
668
|
-
* @deprecated Use {@link Guard} instead. Will be removed in v2.0.0.
|
|
669
|
-
* @private
|
|
670
|
-
*/
|
|
671
|
-
declare const Is: typeof Guard;
|
|
672
|
-
|
|
673
|
-
declare const index_Is: typeof Is;
|
|
674
607
|
declare namespace index {
|
|
675
|
-
export { index$
|
|
608
|
+
export { index$5 as Arr, index$4 as Dom, index$8 as Enum, index$3 as Math, index$2 as Obj, index$1 as Str };
|
|
676
609
|
}
|
|
677
610
|
|
|
678
611
|
type EqualityFn<V> = (a: V, b: V) => boolean;
|
|
@@ -773,9 +706,65 @@ declare class Vec extends BaseContainer {
|
|
|
773
706
|
}
|
|
774
707
|
|
|
775
708
|
/**
|
|
776
|
-
*
|
|
709
|
+
* An immutable 2D rectangle defined by its top-left corner (x, y) and size (width, height).
|
|
710
|
+
* Provides geometric utilities like intersection, containment, scaling, etc.
|
|
711
|
+
*/
|
|
712
|
+
declare class Rect {
|
|
713
|
+
x: number;
|
|
714
|
+
y: number;
|
|
715
|
+
width: number;
|
|
716
|
+
height: number;
|
|
717
|
+
constructor();
|
|
718
|
+
constructor(width: number, height: number);
|
|
719
|
+
constructor(x: number, y: number, width: number, height: number);
|
|
720
|
+
set(): Rect;
|
|
721
|
+
set(width: number, height: number): Rect;
|
|
722
|
+
set(x: number, y: number, width: number, height: number): Rect;
|
|
723
|
+
static fromPoints(p1: {
|
|
724
|
+
x: number;
|
|
725
|
+
y: number;
|
|
726
|
+
}, p2: {
|
|
727
|
+
x: number;
|
|
728
|
+
y: number;
|
|
729
|
+
}): Rect;
|
|
730
|
+
static fromCenter(cx: number, cy: number, width: number, height: number): Rect;
|
|
731
|
+
get left(): number;
|
|
732
|
+
get top(): number;
|
|
733
|
+
get right(): number;
|
|
734
|
+
get bottom(): number;
|
|
735
|
+
get centerX(): number;
|
|
736
|
+
get centerY(): number;
|
|
737
|
+
get center(): {
|
|
738
|
+
x: number;
|
|
739
|
+
y: number;
|
|
740
|
+
};
|
|
741
|
+
get area(): number;
|
|
742
|
+
get isEmpty(): boolean;
|
|
743
|
+
containsPoint(px: number, py: number): boolean;
|
|
744
|
+
containsRect(other: Rect): boolean;
|
|
745
|
+
intersects(other: Rect): boolean;
|
|
746
|
+
intersectionCopy(other: Rect): Rect;
|
|
747
|
+
unionCopy(other: Rect): Rect;
|
|
748
|
+
insetCopy(dx: number, dy: number): Rect;
|
|
749
|
+
inflateCopy(dx: number, dy: number): Rect;
|
|
750
|
+
offsetInPlace(dx: number, dy: number): Rect;
|
|
751
|
+
offsetCopy(dx: number, dy: number): Rect;
|
|
752
|
+
scaleInPlace(scaleX: number, scaleY?: number): Rect;
|
|
753
|
+
scaleCopy(scaleX: number, scaleY?: number): Rect;
|
|
754
|
+
roundCopy(): Rect;
|
|
755
|
+
floorCopy(): Rect;
|
|
756
|
+
ceilCopy(): Rect;
|
|
757
|
+
expandCopy(px: number, py: number): Rect;
|
|
758
|
+
equals(other: Rect): boolean;
|
|
759
|
+
clone(): Rect;
|
|
760
|
+
toString(): string;
|
|
761
|
+
toAnchoredRect(): AnchoredRect;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* A mutable AnchoredRect class is a rectangle (left, top, right, bottom) with an anchor point (anchorX, anchorY).
|
|
777
766
|
*/
|
|
778
|
-
declare class
|
|
767
|
+
declare class AnchoredRect {
|
|
779
768
|
left: number;
|
|
780
769
|
anchorX: number;
|
|
781
770
|
right: number;
|
|
@@ -807,6 +796,31 @@ declare class DivRect {
|
|
|
807
796
|
* @param bottom - Bottom coordinate.
|
|
808
797
|
*/
|
|
809
798
|
constructor(left: number, anchorX: number, right: number, top: number, anchorY: number, bottom: number);
|
|
799
|
+
/**
|
|
800
|
+
* Set rectangle with all zero values.
|
|
801
|
+
*/
|
|
802
|
+
set(): AnchoredRect;
|
|
803
|
+
/**
|
|
804
|
+
* Set rectangle with left, right, top, bottom.
|
|
805
|
+
* Properties anchorX and anchorY will be centered in the middle.
|
|
806
|
+
*
|
|
807
|
+
* @param left - Left coordinate.
|
|
808
|
+
* @param right - Right coordinate.
|
|
809
|
+
* @param top - Top coordinate.
|
|
810
|
+
* @param bottom - Bottom coordinate.
|
|
811
|
+
*/
|
|
812
|
+
set(left: number, right: number, top: number, bottom: number): AnchoredRect;
|
|
813
|
+
/**
|
|
814
|
+
* Set rectangle with full arguments.
|
|
815
|
+
*
|
|
816
|
+
* @param left - Left coordinate.
|
|
817
|
+
* @param anchorX - Center x-coordinate.
|
|
818
|
+
* @param right - Right coordinate.
|
|
819
|
+
* @param top - Top coordinate.
|
|
820
|
+
* @param anchorY - Center y-coordinate.
|
|
821
|
+
* @param bottom - Bottom coordinate.
|
|
822
|
+
*/
|
|
823
|
+
set(left: number, anchorX: number, right: number, top: number, anchorY: number, bottom: number): AnchoredRect;
|
|
810
824
|
/**
|
|
811
825
|
* Create rect from basic left, top, width and height arguments.
|
|
812
826
|
*
|
|
@@ -814,9 +828,9 @@ declare class DivRect {
|
|
|
814
828
|
* @param top - Top coordinate.
|
|
815
829
|
* @param width - Width.
|
|
816
830
|
* @param height - Height.
|
|
817
|
-
* @returns -
|
|
831
|
+
* @returns - AnchoredRect.
|
|
818
832
|
*/
|
|
819
|
-
static create(left: number, top: number, width: number, height: number):
|
|
833
|
+
static create(left: number, top: number, width: number, height: number): AnchoredRect;
|
|
820
834
|
/**
|
|
821
835
|
* Create rect from anchorX, anchorY, width, height arguments.
|
|
822
836
|
*
|
|
@@ -824,9 +838,9 @@ declare class DivRect {
|
|
|
824
838
|
* @param centerY - Center y-coordinate.
|
|
825
839
|
* @param width - Width.
|
|
826
840
|
* @param height - Height.
|
|
827
|
-
* @returns -
|
|
841
|
+
* @returns - AnchoredRect.
|
|
828
842
|
*/
|
|
829
|
-
static createCentered(centerX: number, centerY: number, width: number, height: number):
|
|
843
|
+
static createCentered(centerX: number, centerY: number, width: number, height: number): AnchoredRect;
|
|
830
844
|
/**
|
|
831
845
|
* Create rect from sections.
|
|
832
846
|
*
|
|
@@ -834,29 +848,17 @@ declare class DivRect {
|
|
|
834
848
|
* @param rightw - Right section width.
|
|
835
849
|
* @param toph - Top section height.
|
|
836
850
|
* @param bottomh - Bottomsection height.
|
|
837
|
-
* @returns -
|
|
851
|
+
* @returns - AnchoredRect.
|
|
838
852
|
*/
|
|
839
|
-
static createSections(leftw: number, rightw: number, toph: number, bottomh: number):
|
|
853
|
+
static createSections(leftw: number, rightw: number, toph: number, bottomh: number): AnchoredRect;
|
|
840
854
|
/**
|
|
841
|
-
*
|
|
842
|
-
|
|
843
|
-
* */
|
|
855
|
+
* Get center x-coordinate.
|
|
856
|
+
*/
|
|
844
857
|
get centerX(): number;
|
|
845
858
|
/**
|
|
846
|
-
*
|
|
847
|
-
|
|
848
|
-
* */
|
|
849
|
-
set centerX(x: number);
|
|
850
|
-
/**
|
|
851
|
-
* @deprecated - Renamed to anchorX. Will be removed in v2.0.0.
|
|
852
|
-
* @private
|
|
853
|
-
* */
|
|
859
|
+
* Get center ycoordinate.
|
|
860
|
+
*/
|
|
854
861
|
get centerY(): number;
|
|
855
|
-
/**
|
|
856
|
-
* @deprecated - Renamed to anchorX. Will be removed in v2.0.0.
|
|
857
|
-
* @private
|
|
858
|
-
* */
|
|
859
|
-
set centerY(y: number);
|
|
860
862
|
/**
|
|
861
863
|
* Width getter.
|
|
862
864
|
*/
|
|
@@ -892,123 +894,118 @@ declare class DivRect {
|
|
|
892
894
|
/**
|
|
893
895
|
* Do a and b rects overlap?
|
|
894
896
|
*
|
|
895
|
-
* @param a -
|
|
896
|
-
* @param b -
|
|
897
|
+
* @param a - AnchoredRect a.
|
|
898
|
+
* @param b - AnchoredRect b.
|
|
897
899
|
* @returns - True/false.
|
|
898
900
|
*/
|
|
899
|
-
static overlap(a:
|
|
901
|
+
static overlap(a: AnchoredRect, b: AnchoredRect): boolean;
|
|
900
902
|
/**
|
|
901
903
|
* Do horizontal measures of a and b rects overlap?
|
|
902
904
|
*
|
|
903
|
-
* @param a -
|
|
904
|
-
* @param b -
|
|
905
|
+
* @param a - AnchoredRect a.
|
|
906
|
+
* @param b - AnchoredRect b.
|
|
905
907
|
* @returns - True/false.
|
|
906
908
|
*/
|
|
907
|
-
static overlapX(a:
|
|
909
|
+
static overlapX(a: AnchoredRect, b: AnchoredRect): boolean;
|
|
908
910
|
/**
|
|
909
911
|
* Check if given rects are equal.
|
|
910
|
-
* @param a -
|
|
911
|
-
* @param b -
|
|
912
|
+
* @param a - AnchoredRect a.
|
|
913
|
+
* @param b - AnchoredRect b.
|
|
912
914
|
* @returns - True/false.
|
|
913
915
|
*/
|
|
914
|
-
static equals(a:
|
|
916
|
+
static equals(a: AnchoredRect | null | undefined, b: AnchoredRect | null | undefined): boolean;
|
|
915
917
|
/**
|
|
916
918
|
* Check if this rect equals with another rect.
|
|
917
919
|
* @param other - The other rect.
|
|
918
920
|
* @returns - True/false.
|
|
919
921
|
*/
|
|
920
|
-
equals(other:
|
|
922
|
+
equals(other: AnchoredRect): boolean;
|
|
921
923
|
/**
|
|
922
924
|
* Check if edges of given rects are equal, ignoring anchorX and anchorY.
|
|
923
925
|
*
|
|
924
|
-
* @param a -
|
|
925
|
-
* @param b -
|
|
926
|
+
* @param a - AnchoredRect a.
|
|
927
|
+
* @param b - AnchoredRect b.
|
|
926
928
|
* @returns - True/false.
|
|
927
929
|
*/
|
|
928
|
-
static equalsEdges(a:
|
|
930
|
+
static equalsEdges(a: AnchoredRect | null | undefined, b: AnchoredRect | null | undefined): boolean;
|
|
929
931
|
/**
|
|
930
932
|
* Check if edges of this Rect equals with given Rect, ignoring anchorX and anchorY.
|
|
931
933
|
*
|
|
932
|
-
* @param other - The other
|
|
934
|
+
* @param other - The other AnchoredRect.
|
|
933
935
|
* @returns - True/false.
|
|
934
936
|
*/
|
|
935
|
-
equalsEdges(other:
|
|
936
|
-
/**
|
|
937
|
-
* @deprecated - Use `DivRect.equalsEdges()` instead. Will be removed in v2.0.0.
|
|
938
|
-
* @private
|
|
939
|
-
*/
|
|
940
|
-
static equalsFrame(a: DivRect | null | undefined, b: DivRect | null | undefined): boolean;
|
|
937
|
+
equalsEdges(other: AnchoredRect): boolean;
|
|
941
938
|
/**
|
|
942
939
|
* Created duplicate of this Rect.
|
|
943
|
-
*
|
|
944
940
|
* @returns - Duplicate.
|
|
945
941
|
*/
|
|
946
|
-
|
|
942
|
+
clone(): AnchoredRect;
|
|
947
943
|
/**
|
|
948
944
|
* Move this rect by (dx, dy). Modifies this Rect.
|
|
949
945
|
*
|
|
950
946
|
* @param dx - Offset amount in x-direction.
|
|
951
947
|
* @param dy - Offset amount in y-direction.
|
|
952
|
-
* @returns - This
|
|
948
|
+
* @returns - This AnchoredRect instance.
|
|
953
949
|
*/
|
|
954
|
-
offsetInPlace(dx: number, dy: number):
|
|
950
|
+
offsetInPlace(dx: number, dy: number): AnchoredRect;
|
|
955
951
|
/**
|
|
956
952
|
* Move this rect by (dx, dy). Immutable, returns modified copy.
|
|
957
953
|
*
|
|
958
954
|
* @param dx - Offset amount in x-direction.
|
|
959
955
|
* @param dy - Offset amount in y-direction.
|
|
960
|
-
* @returns -
|
|
956
|
+
* @returns - AnchoredRect copy with applied offset.
|
|
961
957
|
*/
|
|
962
|
-
offsetCopy(dx: number, dy: number):
|
|
958
|
+
offsetCopy(dx: number, dy: number): AnchoredRect;
|
|
963
959
|
/**
|
|
964
960
|
* Expand this Rect by given Rect. Modifies this Rect.
|
|
965
961
|
*
|
|
966
|
-
* @param rect -
|
|
967
|
-
* @returns - This
|
|
962
|
+
* @param rect - AnchoredRect to expand this instance with.
|
|
963
|
+
* @returns - This AnchoredRect instance.
|
|
968
964
|
*/
|
|
969
|
-
expandInPlace(rect:
|
|
965
|
+
expandInPlace(rect: AnchoredRect): AnchoredRect;
|
|
970
966
|
/**
|
|
971
967
|
* Expand this Rect by given Rect. Immutable, returns modified copy.
|
|
972
968
|
*
|
|
973
|
-
* @param rect -
|
|
974
|
-
* @returns - Expanded copy of this
|
|
969
|
+
* @param rect - AnchoredRect to expand this instance with.
|
|
970
|
+
* @returns - Expanded copy of this AnchoredRect.
|
|
975
971
|
*/
|
|
976
|
-
expandCopy(rect:
|
|
972
|
+
expandCopy(rect: AnchoredRect): AnchoredRect;
|
|
977
973
|
/**
|
|
978
974
|
* Clip this Rect by given Rect. Mmodifies this Rect.
|
|
979
975
|
*
|
|
980
|
-
* @param clipRect -
|
|
981
|
-
* @returns - This
|
|
976
|
+
* @param clipRect - AnchoredRect to clip this instance with.
|
|
977
|
+
* @returns - This AnchoredRect instance.
|
|
982
978
|
*/
|
|
983
|
-
clipInPlace(clipRect:
|
|
979
|
+
clipInPlace(clipRect: AnchoredRect): AnchoredRect;
|
|
984
980
|
/**
|
|
985
981
|
* Clip this Rect by given Rect. Immutable, return modified copy.
|
|
986
982
|
*
|
|
987
|
-
* @param clipRect -
|
|
988
|
-
* @returns - Clipped
|
|
983
|
+
* @param clipRect - AnchoredRecto to clip this instance with.
|
|
984
|
+
* @returns - Clipped AnchoredRect copy.
|
|
989
985
|
*/
|
|
990
|
-
clipCopy(clipRect:
|
|
986
|
+
clipCopy(clipRect: AnchoredRect): AnchoredRect;
|
|
991
987
|
/**
|
|
992
988
|
* Scale Rect. Anchor pos is (anchorX, anchorY). Modifies this Rect.
|
|
993
989
|
*
|
|
994
990
|
* @param scaleX - Scale x-amount.
|
|
995
991
|
* @param scaleY - Scale y-amount. If undefined then scale x-amount is used.
|
|
996
|
-
* @returns This
|
|
992
|
+
* @returns This AnchoredRect instance.
|
|
997
993
|
*/
|
|
998
|
-
scaleInPlace(scaleX: number, scaleY?: number):
|
|
994
|
+
scaleInPlace(scaleX: number, scaleY?: number): AnchoredRect;
|
|
999
995
|
/**
|
|
1000
996
|
* Scale Rect. Anchor pos is (anchorX, anchorY). Immutable, returns modified copy.
|
|
1001
997
|
*
|
|
1002
998
|
* @param scaleX - Scale x-amount.
|
|
1003
999
|
* @param scaleY - Scale y-amount. If undefined then scale x-amount is used.
|
|
1004
|
-
* @returns Scaled copy of this
|
|
1000
|
+
* @returns Scaled copy of this AnchoredRect.
|
|
1005
1001
|
*/
|
|
1006
|
-
scaleCopy(scaleX: number, scaleY?: number):
|
|
1002
|
+
scaleCopy(scaleX: number, scaleY?: number): AnchoredRect;
|
|
1007
1003
|
/**
|
|
1008
|
-
* Get this
|
|
1009
|
-
* @returns - This
|
|
1004
|
+
* Get this AnchoredRect instance.
|
|
1005
|
+
* @returns - This AnchoredRect instance.
|
|
1010
1006
|
*/
|
|
1011
|
-
getRect():
|
|
1007
|
+
getRect(): AnchoredRect;
|
|
1008
|
+
toRect(): Rect;
|
|
1012
1009
|
}
|
|
1013
1010
|
|
|
1014
1011
|
/**
|
|
@@ -1473,268 +1470,4 @@ declare class LinkedList<V> extends BaseContainer implements Iterable<V> {
|
|
|
1473
1470
|
clone(): LinkedList<V>;
|
|
1474
1471
|
}
|
|
1475
1472
|
|
|
1476
|
-
|
|
1477
|
-
* @deprecated - Use {@link Vec} instead. Will be removed in v2.0.0.
|
|
1478
|
-
* @private
|
|
1479
|
-
*
|
|
1480
|
-
* Vec2 class.
|
|
1481
|
-
*/
|
|
1482
|
-
declare class Vec2 {
|
|
1483
|
-
readonly x: number;
|
|
1484
|
-
readonly y: number;
|
|
1485
|
-
constructor(x?: number, y?: number);
|
|
1486
|
-
length(): number;
|
|
1487
|
-
add(a: Vec2): Vec2;
|
|
1488
|
-
sub(a: Vec2): Vec2;
|
|
1489
|
-
mul(a: number): Vec2;
|
|
1490
|
-
div(a: number): Vec2;
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
|
-
/**
|
|
1494
|
-
* @deprecated - Use {@link SignedIndexArray} or {@link IndexArray} instead, they have way more functions. Will be removed in v2.0.0.
|
|
1495
|
-
* @private
|
|
1496
|
-
*
|
|
1497
|
-
* A cache-like structure optimized for small-range integer keys, including negatives.
|
|
1498
|
-
*
|
|
1499
|
-
* Internally implemented using two sparse arrays: one for non-negative keys,
|
|
1500
|
-
* and one for negative keys (stored by index `-key - 1`).
|
|
1501
|
-
*
|
|
1502
|
-
* @remarks
|
|
1503
|
-
* - Fast access for small integer keys.
|
|
1504
|
-
* - Not suitable for large or sparse key ranges — memory usage may grow significantly.
|
|
1505
|
-
* - Supports `get`, `set`, `delete`, `has` and `clear`
|
|
1506
|
-
*
|
|
1507
|
-
* @example
|
|
1508
|
-
* ```ts
|
|
1509
|
-
* const cache = new SmallIntCache<string>();
|
|
1510
|
-
* cache.set(-2, 'A');
|
|
1511
|
-
* cache.set(3, 'B');
|
|
1512
|
-
* console.log(cache.get(-2)); // 'A'
|
|
1513
|
-
* ```
|
|
1514
|
-
*/
|
|
1515
|
-
declare class SmallIntCache<VALUE> {
|
|
1516
|
-
private pos;
|
|
1517
|
-
private neg;
|
|
1518
|
-
constructor();
|
|
1519
|
-
set(key: number, value: VALUE): void;
|
|
1520
|
-
get(key: number): VALUE | undefined;
|
|
1521
|
-
has(key: number): boolean;
|
|
1522
|
-
delete(key: number): void;
|
|
1523
|
-
clear(): void;
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
/**
|
|
1527
|
-
* @deprecated - Use {@link UniMap} instead. Will be removed in v2.0.0.
|
|
1528
|
-
* @private
|
|
1529
|
-
* A Map implementation mapping a single key to a value.
|
|
1530
|
-
*/
|
|
1531
|
-
declare class Map1<KEY1, VALUE> extends BaseContainer implements KVComponent<[KEY1], VALUE> {
|
|
1532
|
-
private map1;
|
|
1533
|
-
constructor();
|
|
1534
|
-
constructor(map1: Map1<KEY1, VALUE>);
|
|
1535
|
-
constructor(entries: Iterable<[KEY1, VALUE]>);
|
|
1536
|
-
has(key1: KEY1): boolean;
|
|
1537
|
-
set(key1: KEY1, value: VALUE): VALUE;
|
|
1538
|
-
get(key1: KEY1): VALUE | undefined;
|
|
1539
|
-
getOrDefault(key1: KEY1, defaultValue: VALUE): VALUE;
|
|
1540
|
-
getOrCreate(key1: KEY1, value: VALUE): VALUE;
|
|
1541
|
-
getOrCreate(key1: KEY1, creator: () => VALUE): VALUE;
|
|
1542
|
-
delete(key1: KEY1): boolean;
|
|
1543
|
-
clear(): void;
|
|
1544
|
-
get size(): number;
|
|
1545
|
-
isEmpty(): boolean;
|
|
1546
|
-
forEach(callbackfn: (value: VALUE, key1: KEY1, map1: Map1<KEY1, VALUE>) => void, thisArg?: any): void;
|
|
1547
|
-
keys(): IterableIterator<KEY1>;
|
|
1548
|
-
values(): IterableIterator<VALUE>;
|
|
1549
|
-
entries(): IterableIterator<[KEY1, VALUE]>;
|
|
1550
|
-
keysArray(): KEY1[];
|
|
1551
|
-
valuesArray(): VALUE[];
|
|
1552
|
-
entriesArray(): [KEY1, VALUE][];
|
|
1553
|
-
kvKeys(): IterableIterator<[KEY1]>;
|
|
1554
|
-
kvValues(): IterableIterator<VALUE>;
|
|
1555
|
-
kvEntries(): IterableIterator<[[KEY1], VALUE]>;
|
|
1556
|
-
[Symbol.iterator](): IterableIterator<[KEY1, VALUE]>;
|
|
1557
|
-
clone(): Map1<KEY1, VALUE>;
|
|
1558
|
-
merge(other: Map1<KEY1, VALUE>, conflictResolver?: (oldValue: VALUE, newValue: VALUE, key1: KEY1) => VALUE): this;
|
|
1559
|
-
some(fn: (value: VALUE, key1: KEY1) => boolean): boolean;
|
|
1560
|
-
every(fn: (value: VALUE, key1: KEY1) => boolean): boolean;
|
|
1561
|
-
filter<S extends VALUE>(predicate: (value: VALUE, key1: KEY1, array: Map1<KEY1, VALUE>) => value is S): Map1<KEY1, S>;
|
|
1562
|
-
filter(predicate: (value: VALUE, key1: KEY1, array: Map1<KEY1, VALUE>) => unknown): Map1<KEY1, VALUE>;
|
|
1563
|
-
reduce(fn: (acc: VALUE, value: VALUE, key1: KEY1) => VALUE): VALUE;
|
|
1564
|
-
reduce<R>(fn: (acc: R, value: VALUE, key1: KEY1) => R, init: R): R;
|
|
1565
|
-
mapEntries<R>(fn: (value: VALUE, key1: KEY1) => R): R[];
|
|
1566
|
-
mapValues<R = VALUE>(fn: (value: VALUE, key1: KEY1) => R): Map1<KEY1, R>;
|
|
1567
|
-
toMap(): Map<KEY1, VALUE>;
|
|
1568
|
-
toString(): string;
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
/**
|
|
1572
|
-
* @deprecated - Use {@link BiMap} instead. Will be removed in v2.0.0.
|
|
1573
|
-
* @private
|
|
1574
|
-
* A Map implementation mapping a double key to a value.
|
|
1575
|
-
*/
|
|
1576
|
-
declare class Map2<KEY1, KEY2, VALUE> extends BaseContainer implements KVComponent<[KEY1, KEY2], VALUE> {
|
|
1577
|
-
private map1;
|
|
1578
|
-
constructor();
|
|
1579
|
-
constructor(map2: Map2<KEY1, KEY2, VALUE>);
|
|
1580
|
-
constructor(entries: Iterable<[KEY1, KEY2, VALUE]>);
|
|
1581
|
-
has(key1: KEY1, key2: KEY2): boolean;
|
|
1582
|
-
set(key1: KEY1, key2: KEY2, value: VALUE): VALUE;
|
|
1583
|
-
get(key1: KEY1, key2: KEY2): VALUE | undefined;
|
|
1584
|
-
getOrDefault(key1: KEY1, key2: KEY2, defaultValue: VALUE): VALUE;
|
|
1585
|
-
getOrCreate(key1: KEY1, key2: KEY2, value: VALUE): VALUE;
|
|
1586
|
-
getOrCreate(key1: KEY1, key2: KEY2, creator: () => VALUE): VALUE;
|
|
1587
|
-
delete(key1: KEY1): boolean;
|
|
1588
|
-
delete(key1: KEY1, key2: KEY2): boolean;
|
|
1589
|
-
clear(): void;
|
|
1590
|
-
get size(): number;
|
|
1591
|
-
isEmpty(): boolean;
|
|
1592
|
-
forEach(callbackfn: (value: VALUE, key1: KEY1, key2: KEY2, map2: Map2<KEY1, KEY2, VALUE>) => void, thisArg?: any): void;
|
|
1593
|
-
keys(): IterableIterator<[KEY1, KEY2]>;
|
|
1594
|
-
values(): IterableIterator<VALUE>;
|
|
1595
|
-
entries(): IterableIterator<[KEY1, KEY2, VALUE]>;
|
|
1596
|
-
keysArray(): [KEY1, KEY2][];
|
|
1597
|
-
valuesArray(): VALUE[];
|
|
1598
|
-
entriesArray(): [KEY1, KEY2, VALUE][];
|
|
1599
|
-
kvKeys(): IterableIterator<[KEY1, KEY2]>;
|
|
1600
|
-
kvValues(): IterableIterator<VALUE>;
|
|
1601
|
-
kvEntries(): IterableIterator<[[KEY1, KEY2], VALUE]>;
|
|
1602
|
-
[Symbol.iterator](): IterableIterator<[KEY1, KEY2, VALUE]>;
|
|
1603
|
-
clone(): Map2<KEY1, KEY2, VALUE>;
|
|
1604
|
-
merge(other: Map2<KEY1, KEY2, VALUE>, conflictResolver?: (oldValue: VALUE, newValue: VALUE, key1: KEY1, key2: KEY2) => VALUE): this;
|
|
1605
|
-
some(fn: (value: VALUE, key1: KEY1, key2: KEY2) => boolean): boolean;
|
|
1606
|
-
every(fn: (value: VALUE, key1: KEY1, key2: KEY2) => boolean): boolean;
|
|
1607
|
-
filter<S extends VALUE>(predicate: (value: VALUE, key1: KEY1, key2: KEY2, array: Map2<KEY1, KEY2, VALUE>) => value is S): Map2<KEY1, KEY2, S>;
|
|
1608
|
-
filter(predicate: (value: VALUE, key1: KEY1, key2: KEY2, array: Map2<KEY1, KEY2, VALUE>) => unknown): Map2<KEY1, KEY2, VALUE>;
|
|
1609
|
-
reduce(fn: (acc: VALUE, value: VALUE, key1: KEY1, key2: KEY2) => VALUE): VALUE;
|
|
1610
|
-
reduce<R>(fn: (acc: R, value: VALUE, key1: KEY1, key2: KEY2) => R, init: R): R;
|
|
1611
|
-
mapEntries<R>(fn: (value: VALUE, key1: KEY1, key2: KEY2) => R): R[];
|
|
1612
|
-
mapValues<R = VALUE>(fn: (value: VALUE, key1: KEY1, key2: KEY2) => R): Map2<KEY1, KEY2, R>;
|
|
1613
|
-
toMap(): Map<[KEY1, KEY2], VALUE>;
|
|
1614
|
-
toString(): string;
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
/**
|
|
1618
|
-
* @deprecated - Use {@link TriMap} instead. Will be removed in v2.0.0.
|
|
1619
|
-
* @private
|
|
1620
|
-
* A Map implementation mapping a triple key to a value.
|
|
1621
|
-
*/
|
|
1622
|
-
declare class Map3<KEY1, KEY2, KEY3, VALUE> extends BaseContainer implements KVComponent<[KEY1, KEY2, KEY3], VALUE> {
|
|
1623
|
-
private map1;
|
|
1624
|
-
constructor();
|
|
1625
|
-
constructor(entries: Iterable<[KEY1, KEY2, KEY3, VALUE]>);
|
|
1626
|
-
constructor(map3: Map3<KEY1, KEY2, KEY3, VALUE>);
|
|
1627
|
-
has(key1: KEY1, key2: KEY2, key3: KEY3): boolean;
|
|
1628
|
-
set(key1: KEY1, key2: KEY2, key3: KEY3, value: VALUE): VALUE;
|
|
1629
|
-
get(key1: KEY1, key2: KEY2, key3: KEY3): VALUE | undefined;
|
|
1630
|
-
getOrDefault(key1: KEY1, key2: KEY2, key3: KEY3, defaultValue: VALUE): VALUE;
|
|
1631
|
-
getOrCreate(key1: KEY1, key2: KEY2, key3: KEY3, value: VALUE): VALUE;
|
|
1632
|
-
getOrCreate(key1: KEY1, key2: KEY2, key3: KEY3, creator: () => VALUE): VALUE;
|
|
1633
|
-
delete(key1: KEY1): boolean;
|
|
1634
|
-
delete(key1: KEY1, key2: KEY2): boolean;
|
|
1635
|
-
delete(key1: KEY1, key2: KEY2, key3: KEY3): boolean;
|
|
1636
|
-
clear(): void;
|
|
1637
|
-
get size(): number;
|
|
1638
|
-
isEmpty(): boolean;
|
|
1639
|
-
forEach(callbackfn: (value: VALUE, key1: KEY1, key2: KEY2, key3: KEY3, map2: Map3<KEY1, KEY2, KEY3, VALUE>) => void, thisArg?: any): void;
|
|
1640
|
-
keys(): IterableIterator<[KEY1, KEY2, KEY3]>;
|
|
1641
|
-
values(): IterableIterator<VALUE>;
|
|
1642
|
-
entries(): IterableIterator<[KEY1, KEY2, KEY3, VALUE]>;
|
|
1643
|
-
keysArray(): [KEY1, KEY2, KEY3][];
|
|
1644
|
-
valuesArray(): VALUE[];
|
|
1645
|
-
entriesArray(): [KEY1, KEY2, KEY3, VALUE][];
|
|
1646
|
-
kvKeys(): IterableIterator<[KEY1, KEY2, KEY3]>;
|
|
1647
|
-
kvValues(): IterableIterator<VALUE>;
|
|
1648
|
-
kvEntries(): IterableIterator<[[KEY1, KEY2, KEY3], VALUE]>;
|
|
1649
|
-
[Symbol.iterator](): IterableIterator<[KEY1, KEY2, KEY3, VALUE]>;
|
|
1650
|
-
clone(): Map3<KEY1, KEY2, KEY3, VALUE>;
|
|
1651
|
-
merge(other: Map3<KEY1, KEY2, KEY3, VALUE>, conflictResolver?: (oldValue: VALUE, newValue: VALUE, key1: KEY1, key2: KEY2, key3: KEY3) => VALUE): this;
|
|
1652
|
-
some(fn: (value: VALUE, key1: KEY1, key2: KEY2, key3: KEY3) => boolean): boolean;
|
|
1653
|
-
every(fn: (value: VALUE, key1: KEY1, key2: KEY2, key3: KEY3) => boolean): boolean;
|
|
1654
|
-
filter<S extends VALUE>(predicate: (value: VALUE, key1: KEY1, key2: KEY2, key3: KEY3, array: Map3<KEY1, KEY2, KEY3, VALUE>) => value is S): Map3<KEY1, KEY2, KEY3, S>;
|
|
1655
|
-
filter(predicate: (value: VALUE, key1: KEY1, key2: KEY2, key3: KEY3, array: Map3<KEY1, KEY2, KEY3, VALUE>) => unknown): Map3<KEY1, KEY2, KEY3, VALUE>;
|
|
1656
|
-
reduce(fn: (acc: VALUE, value: VALUE, key1: KEY1, key2: KEY2, key3: KEY3) => VALUE): VALUE;
|
|
1657
|
-
reduce<R>(fn: (acc: R, value: VALUE, key1: KEY1, key2: KEY2, key3: KEY3) => R, init: R): R;
|
|
1658
|
-
mapEntries<R>(fn: (value: VALUE, key1: KEY1, key2: KEY2, key3: KEY3) => R): R[];
|
|
1659
|
-
mapValues<R = VALUE>(fn: (value: VALUE, key1: KEY1, key2: KEY2, key3: KEY3) => R): Map3<KEY1, KEY2, KEY3, R>;
|
|
1660
|
-
toMap(): Map<[KEY1, KEY2, KEY3], VALUE>;
|
|
1661
|
-
toString(): string;
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
/**
|
|
1665
|
-
* @deprecated - Use {@link ValueSet} instead. Will be removed in v2.0.0.
|
|
1666
|
-
* @private
|
|
1667
|
-
* An abstract base class implementation of a Set data structure.
|
|
1668
|
-
*/
|
|
1669
|
-
declare abstract class SetBase<VALUE, CLS extends SetBase<VALUE, CLS> = any> extends BaseContainer implements KVComponent<[VALUE], VALUE> {
|
|
1670
|
-
protected data: Set<VALUE>;
|
|
1671
|
-
constructor(entries?: Iterable<VALUE>);
|
|
1672
|
-
protected abstract valueEquals(a: VALUE, b: VALUE): boolean;
|
|
1673
|
-
protected abstract createEmpty<R = VALUE>(): SetBase<R, any>;
|
|
1674
|
-
has(value: VALUE): boolean;
|
|
1675
|
-
add(value: VALUE): VALUE;
|
|
1676
|
-
/** @internal - This method exists only for interface `KVComponent` compatibility.*/
|
|
1677
|
-
set(key: VALUE, value: VALUE): void;
|
|
1678
|
-
/** @internal - This method exists only for interface `KVComponent` compatibility.*/
|
|
1679
|
-
get(key: VALUE): VALUE | undefined;
|
|
1680
|
-
/** @internal - This method exists only for interface `KVComponent` compatibility.*/
|
|
1681
|
-
getOrDefault(key: VALUE, defaultValue: VALUE): VALUE;
|
|
1682
|
-
/** @internal - This method exists only for interface `KVComponent` compatibility.*/
|
|
1683
|
-
getOrCreate(key: VALUE, value: VALUE): VALUE;
|
|
1684
|
-
/** @internal - This method exists only for interface `KVComponent` compatibility.*/
|
|
1685
|
-
getOrCreate(key: VALUE, creator: () => VALUE): VALUE;
|
|
1686
|
-
delete(value: VALUE): boolean;
|
|
1687
|
-
clear(): void;
|
|
1688
|
-
get size(): number;
|
|
1689
|
-
isEmpty(): boolean;
|
|
1690
|
-
forEach(callbackfn: (value: VALUE, set1: SetBase<VALUE>) => void, thisArg?: any): void;
|
|
1691
|
-
keys(): IterableIterator<VALUE>;
|
|
1692
|
-
values(): IterableIterator<VALUE>;
|
|
1693
|
-
entries(): IterableIterator<[VALUE, VALUE]>;
|
|
1694
|
-
kvKeys(): IterableIterator<[VALUE]>;
|
|
1695
|
-
kvValues(): IterableIterator<VALUE>;
|
|
1696
|
-
kvEntries(): IterableIterator<[[VALUE], VALUE]>;
|
|
1697
|
-
[Symbol.iterator](): IterableIterator<VALUE>;
|
|
1698
|
-
clone(): SetBase<VALUE>;
|
|
1699
|
-
merge(other: SetBase<VALUE>): this;
|
|
1700
|
-
some(fn: (value: VALUE) => boolean): boolean;
|
|
1701
|
-
every(fn: (value: VALUE) => boolean): boolean;
|
|
1702
|
-
filter<R extends VALUE>(predicate: (value: VALUE, set1: SetBase<VALUE, any>) => value is R): SetBase<R, any>;
|
|
1703
|
-
filter(predicate: (value: VALUE, set1: SetBase<VALUE>) => unknown): SetBase<VALUE, any>;
|
|
1704
|
-
reduce(fn: (acc: VALUE, value: VALUE) => VALUE): VALUE;
|
|
1705
|
-
reduce<R = VALUE>(fn: (acc: R, value: VALUE) => R, init: R): R;
|
|
1706
|
-
mapValues<R = VALUE>(fn: (value: VALUE) => R): SetBase<R, any>;
|
|
1707
|
-
mapToArray<R = VALUE>(fn: (value: VALUE) => R): R[];
|
|
1708
|
-
map<R = VALUE>(fn: (value: VALUE) => R): SetBase<R, any>;
|
|
1709
|
-
toSet(): Set<VALUE>;
|
|
1710
|
-
toArray(): VALUE[];
|
|
1711
|
-
toString(): string;
|
|
1712
|
-
}
|
|
1713
|
-
/**
|
|
1714
|
-
* @deprecated - Use {@link ValueSet} instead. Will be removed in v2.0.0.
|
|
1715
|
-
* @private
|
|
1716
|
-
* A simple Set data structure. Comparison of values is done
|
|
1717
|
-
* using === operator (e.g. "a" === "a", but [1, 2] !== [1, 2]).
|
|
1718
|
-
*/
|
|
1719
|
-
declare class Set1<VALUE> extends SetBase<VALUE, Set1<VALUE>> {
|
|
1720
|
-
constructor();
|
|
1721
|
-
constructor(set: SetBase<VALUE>);
|
|
1722
|
-
constructor(entries: Iterable<VALUE>);
|
|
1723
|
-
protected createEmpty<R = VALUE>(): Set1<R>;
|
|
1724
|
-
protected valueEquals(a: VALUE, b: VALUE): boolean;
|
|
1725
|
-
}
|
|
1726
|
-
/**
|
|
1727
|
-
* @deprecated - Use {@link ValueSet}.createDeep() instead. Will be removed in v2.0.0.
|
|
1728
|
-
* @private
|
|
1729
|
-
* A simple Set data structure, where comparison of values is done
|
|
1730
|
-
* using deep equality (e.g. "a" === "a" and also [1, 2] === [1, 2]).
|
|
1731
|
-
*/
|
|
1732
|
-
declare class DeepSet<VALUE> extends SetBase<VALUE, DeepSet<VALUE>> {
|
|
1733
|
-
constructor();
|
|
1734
|
-
constructor(set: SetBase<VALUE>);
|
|
1735
|
-
constructor(entries: Iterable<VALUE>);
|
|
1736
|
-
protected createEmpty<R = VALUE>(): DeepSet<R>;
|
|
1737
|
-
protected valueEquals(a: VALUE, b: VALUE): boolean;
|
|
1738
|
-
}
|
|
1739
|
-
|
|
1740
|
-
export { index$7 as Assert, BaseContainer, BiMap, cookies as Cookies, DeepSet, DefaultArray, DefaultEqualityFn, device as Device, DivRect, type EqualityFn, Guard, IndexArray, type KVComponent, LRUCache, LinkedList, Map1, Map2, Map3, MultiContainer, Set1, SetBase, SignedIndexArray, SmallIntCache, Stack, TriMap, UniMap, index as Utils, ValueSet, Vec, Vec2, asMulti };
|
|
1473
|
+
export { AnchoredRect, index$7 as Assert, BaseContainer, BiMap, cookies as Cookies, DefaultArray, DefaultEqualityFn, device as Device, type EqualityFn, index$6 as Guard, IndexArray, type KVComponent, LRUCache, LinkedList, MultiContainer, Rect, SignedIndexArray, Stack, TriMap, UniMap, index as Utils, ValueSet, Vec, asMulti };
|