@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/dist/index.d.ts 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$8_assertEnumValue as assertEnumValue, 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, isEnumValue$2 as isEnumValue };
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>(value: T | null | undefined, msg?: string): T;
114
- declare function requireDefined<T>(value: T | undefined, msg?: string): 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 isEqual$1(value1: unknown, value2: unknown, msg?: string): boolean;
117
- declare function isDeepEqual$1(value1: unknown, value2: unknown, msg?: string): boolean;
118
- declare function isUndefined$1(value: unknown, msg?: string): value is undefined;
119
- declare function isNull$1(value: unknown, msg?: string): value is null;
120
- declare function isNullish$1(value: unknown, msg?: string): value is null | undefined;
121
- declare function isObject$1(value: unknown, msg?: string): value is Record<string, unknown>;
122
- declare function isObjectOrUndefined$1(value: unknown, msg?: string): value is Record<string, unknown> | undefined;
123
- declare function isTypedObject$1<T extends object>(obj: unknown, keys: (keyof T)[], msg?: string): obj is HasProps<T>;
124
- declare function isArray$1<T>(value: T[] | unknown, msg?: string): value is T[];
125
- declare function isArrayOrUndefined$1(value: unknown, msg?: string): value is unknown[] | undefined;
126
- declare function isEmptyArray$1<T>(value: T[] | unknown, msg?: string): value is T[];
127
- declare function isNonEmptyArray$1<T>(value: T[] | unknown, msg?: string): value is T[];
128
- declare function isEmptyArrayOrUndefined$1<T>(value: T[] | unknown, msg?: string): value is T[] | undefined;
129
- declare function isNonEmptyArrayOrUndefined$1<T>(value: T[] | unknown, msg?: string): value is T[] | undefined;
130
- declare function isString$1(value: unknown, msg?: string): value is string;
131
- declare function isEmptyString$1(value: unknown, msg?: string): value is "";
132
- declare function isNonEmptyString$1(value: unknown, msg?: string): value is string;
133
- declare function isStringOrUndefined$1(value: unknown, msg?: string): value is string | undefined;
134
- declare function isEmptyStringOrUndefined$1(value: unknown, msg?: string): value is "" | undefined;
135
- declare function isNonEmptyStringOrUndefined$1(value: unknown, msg?: string): value is string | undefined;
136
- declare function isBoolean$1(value: unknown, msg?: string): value is boolean;
137
- declare function isBooleanOrUndefined$1(value: unknown, msg?: string): value is boolean | undefined;
138
- declare function isTrue$1(value: unknown, msg?: string): value is boolean;
139
- declare function isTrueOrUndefined$1(value: unknown, msg?: string): value is boolean;
140
- declare function isFalse$1(value: unknown, msg?: string): value is boolean;
141
- declare function isFalseOrUndefined$1(value: unknown, msg?: string): value is boolean;
142
- declare function isFunction$1(value: unknown, msg?: string): value is Function;
143
- declare function isFunctionOrUndefined$1(value: unknown, msg?: string): value is Function | undefined;
144
- declare function isEnumValue$1<E extends EnumObject>(enumValue: unknown, enumObject: E, msg?: string): enumValue is E[keyof E];
145
- declare function isEnumValueOrUndefined$1<E extends EnumObject>(enumValue: unknown, enumObject: E, msg?: string): enumValue is E[keyof E];
146
- declare function isNumber$1(value: unknown, msg?: string): value is number;
147
- declare function isNumberOrUndefined$1(value: unknown, msg?: string): value is number | undefined;
148
- declare function isFinite$1(value: unknown, msg?: string): value is number;
149
- declare function isInteger$1(value: unknown, msg?: string): value is number;
150
- declare function isIntegerOrUndefined$1(value: unknown, msg?: string): value is number | undefined;
151
- declare function isIntegerEq$1(value: unknown, compareTo: unknown, msg?: string): value is number;
152
- declare function isIntegerGt$1(value: unknown, compareTo: unknown, msg?: string): value is number;
153
- declare function isIntegerGte$1(value: unknown, compareTo: unknown, msg?: string): value is number;
154
- declare function isIntegerLt$1(value: unknown, compareTo: unknown, msg?: string): value is number;
155
- declare function isIntegerLte$1(value: unknown, compareTo: unknown, msg?: string): value is number;
156
- declare function isIntegerBetween$1(value: unknown, min: unknown, max: unknown, msg?: string): value is number;
157
- declare function isIntegerBetweenExclusive$1(value: unknown, min: unknown, max: unknown, msg?: string): value is number;
158
- declare function isNumberBetween$1(value: unknown, min: unknown, max: unknown, msg?: string): value is number;
159
- declare function isNumberBetweenExclusive$1(value: unknown, min: unknown, max: unknown, msg?: string): value is number;
160
- declare function isNaNValue$1(value: unknown, msg?: string): value is number;
161
- declare function isInfinity$1(value: unknown, msg?: string): value is number;
162
- declare function isPosInfinity$1(value: unknown, msg?: string): value is number;
163
- declare function isNegInfinity$1(value: unknown, msg?: string): value is number;
164
- declare function isOddNumber$1(value: unknown, msg?: string): value is number;
165
- declare function isEvenNumber$1(value: unknown, msg?: string): value is number;
166
- declare function isIncluded$1<T>(value: T, array: ReadonlyArray<T>, msg?: string): value is T;
167
- declare function isArrayIndex$1<T>(index: unknown, array: ReadonlyArray<T>, msg?: string): index is number;
168
- declare function isThrowing$1(throwTestFn: () => void, msg?: string): true;
169
- declare function isNotThrowing$1(throwTestFn: () => void, msg?: string): true;
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$7_array_elem as array_elem, index$7_array_id as array_id, index$7_assert as assert, index$7_assertEnum as assertEnum, index$7_eq as eq, index$7_even as even, index$7_fail as fail, index$7_finite as finite, index$7_in_group as in_group, index$7_int as int, index$7_int_between as int_between, index$7_int_between_exclusive as int_between_exclusive, index$7_int_eq as int_eq, index$7_int_gt as int_gt, index$7_int_gte as int_gte, index$7_int_lt as int_lt, index$7_int_lte as int_lte, index$7_interrupt as interrupt, isArray$1 as isArray, isArrayIndex$1 as isArrayIndex, isArrayOrUndefined$1 as isArrayOrUndefined, isBoolean$1 as isBoolean, isBooleanOrUndefined$1 as isBooleanOrUndefined, isDeepEqual$1 as isDeepEqual, isEmptyArray$1 as isEmptyArray, isEmptyArrayOrUndefined$1 as isEmptyArrayOrUndefined, isEmptyString$1 as isEmptyString, isEmptyStringOrUndefined$1 as isEmptyStringOrUndefined, isEnumValue$1 as isEnumValue, isEnumValueOrUndefined$1 as isEnumValueOrUndefined, isEqual$1 as isEqual, isEvenNumber$1 as isEvenNumber, isFalse$1 as isFalse, isFalseOrUndefined$1 as isFalseOrUndefined, isFinite$1 as isFinite, isFunction$1 as isFunction, isFunctionOrUndefined$1 as isFunctionOrUndefined, isIncluded$1 as isIncluded, 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, isNaNValue$1 as isNaNValue, isNegInfinity$1 as isNegInfinity, isNonEmptyArray$1 as isNonEmptyArray, isNonEmptyArrayOrUndefined$1 as isNonEmptyArrayOrUndefined, isNonEmptyString$1 as isNonEmptyString, isNonEmptyStringOrUndefined$1 as isNonEmptyStringOrUndefined, isNotThrowing$1 as isNotThrowing, isNull$1 as isNull, isNullish$1 as isNullish, isNumber$1 as isNumber, isNumberBetween$1 as isNumberBetween, isNumberBetweenExclusive$1 as isNumberBetweenExclusive, isNumberOrUndefined$1 as isNumberOrUndefined, isObject$1 as isObject, isObjectOrUndefined$1 as isObjectOrUndefined, isOddNumber$1 as isOddNumber, isPosInfinity$1 as isPosInfinity, isString$1 as isString, isStringOrUndefined$1 as isStringOrUndefined, isThrowing$1 as isThrowing, isTrue$1 as isTrue, isTrueOrUndefined$1 as isTrueOrUndefined, isTypedObject$1 as isTypedObject, isUndefined$1 as isUndefined, index$7_odd as odd, index$7_require as require, index$7_requireDefined as requireDefined, index$7_setErrorClass as setErrorClass };
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 isTypedObject<T extends object>(obj: unknown, keys: (keyof T)[]): obj is HasProps<T>;
326
- declare function isArray<T>(a: T[] | unknown): a is T[];
327
- declare function isArrayOrUndefined(value: unknown): value is unknown[] | undefined;
328
- declare function isEmptyArray<T>(a: T[] | unknown): a is T[];
329
- declare function isNonEmptyArray<T>(a: T[] | unknown): a is T[];
330
- declare function isEmptyArrayOrUndefined<T>(a: T[] | unknown): a is T[] | undefined;
331
- declare function isNonEmptyArrayOrUndefined<T>(a: T[] | unknown): a is T[] | undefined;
332
- declare function isString(value: unknown): value is string;
333
- declare function isEmptyString(value: unknown): value is "";
334
- declare function isNonEmptyString(value: unknown): value is string;
335
- declare function isStringOrUndefined(value: unknown): value is string | undefined;
336
- declare function isEmptyStringOrUndefined(value: unknown): value is "" | undefined;
337
- declare function isNonEmptyStringOrUndefined(value: unknown): value is string | undefined;
338
- declare function isBoolean(value: unknown): value is boolean;
339
- declare function isBooleanOrUndefined(value: unknown): value is boolean | undefined;
340
- declare function isTrue(value: unknown): value is true;
341
- declare function isTrueOrUndefined(value: unknown): value is true;
342
- declare function isFalse(value: unknown): value is false;
343
- declare function isFalseOrUndefined(value: unknown): value is false;
344
- declare function isFunction(value: unknown): value is Function;
345
- declare function isFunctionOrUndefined(value: unknown): value is Function | undefined;
346
- declare function isEnumValue<E extends Record<string, string | number>>(value: unknown, enumObj: E, name?: string): value is E[keyof E];
347
- declare function isEnumValueOrUndefined<E extends Record<string, string | number>>(value: unknown, enumObj: E, name?: string): value is E[keyof E] | undefined;
348
- declare function isNumber(value: unknown): value is number;
349
- declare function isNumberOrUndefined(value: unknown): value is number | undefined;
350
- declare function isFinite(value: unknown): value is number;
351
- declare function isInteger(n: unknown): n is number;
352
- declare function isIntegerOrUndefined(n: unknown): n is number | undefined;
353
- declare function isIntegerEq(value: unknown, compareTo: unknown): value is number;
354
- declare function isIntegerGt(value: unknown, compareTo: unknown): value is number;
355
- declare function isIntegerGte(value: unknown, compareTo: unknown): value is number;
356
- declare function isIntegerLt(value: unknown, compareTo: unknown): value is number;
357
- declare function isIntegerLte(value: unknown, compareTo: unknown): value is number;
358
- declare function isIntegerBetween(value: unknown, min: unknown, max: unknown): value is number;
359
- declare function isIntegerBetweenExclusive(value: unknown, min: unknown, max: unknown): value is number;
360
- declare function isNumberBetween(value: unknown, min: unknown, max: unknown): value is number;
361
- declare function isNumberBetweenExclusive(value: unknown, min: unknown, max: unknown): value is number;
362
- declare function isNaNValue(value: unknown): value is number;
363
- declare function isInfinity(value: unknown): value is number;
364
- declare function isPosInfinity(value: unknown): value is number;
365
- declare function isNegInfinity(value: unknown): value is number;
366
- declare function isOddNumber(value: unknown): value is number;
367
- declare function isEvenNumber(value: unknown): value is number;
368
- declare function isIncluded<T>(value: T, array: ReadonlyArray<T>): value is T;
369
- declare function isArrayIndex<T>(index: unknown, array: ReadonlyArray<T>): index is number;
370
- declare function isThrowing(throwTestFn: () => void): boolean;
371
- declare function isNotThrowing(throwTestFn: () => void): boolean;
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 Guard_HasProps<T extends object> = HasProps<T>;
375
- declare const Guard_isArray: typeof isArray;
376
- declare const Guard_isArrayIndex: typeof isArrayIndex;
377
- declare const Guard_isArrayOrUndefined: typeof isArrayOrUndefined;
378
- declare const Guard_isBoolean: typeof isBoolean;
379
- declare const Guard_isBooleanOrUndefined: typeof isBooleanOrUndefined;
380
- declare const Guard_isDeepEqual: typeof isDeepEqual;
381
- declare const Guard_isEmptyArray: typeof isEmptyArray;
382
- declare const Guard_isEmptyArrayOrUndefined: typeof isEmptyArrayOrUndefined;
383
- declare const Guard_isEmptyString: typeof isEmptyString;
384
- declare const Guard_isEmptyStringOrUndefined: typeof isEmptyStringOrUndefined;
385
- declare const Guard_isEnumValue: typeof isEnumValue;
386
- declare const Guard_isEnumValueOrUndefined: typeof isEnumValueOrUndefined;
387
- declare const Guard_isEqual: typeof isEqual;
388
- declare const Guard_isEvenNumber: typeof isEvenNumber;
389
- declare const Guard_isFalse: typeof isFalse;
390
- declare const Guard_isFalseOrUndefined: typeof isFalseOrUndefined;
391
- declare const Guard_isFinite: typeof isFinite;
392
- declare const Guard_isFunction: typeof isFunction;
393
- declare const Guard_isFunctionOrUndefined: typeof isFunctionOrUndefined;
394
- declare const Guard_isIncluded: typeof isIncluded;
395
- declare const Guard_isInfinity: typeof isInfinity;
396
- declare const Guard_isInteger: typeof isInteger;
397
- declare const Guard_isIntegerBetween: typeof isIntegerBetween;
398
- declare const Guard_isIntegerBetweenExclusive: typeof isIntegerBetweenExclusive;
399
- declare const Guard_isIntegerEq: typeof isIntegerEq;
400
- declare const Guard_isIntegerGt: typeof isIntegerGt;
401
- declare const Guard_isIntegerGte: typeof isIntegerGte;
402
- declare const Guard_isIntegerLt: typeof isIntegerLt;
403
- declare const Guard_isIntegerLte: typeof isIntegerLte;
404
- declare const Guard_isIntegerOrUndefined: typeof isIntegerOrUndefined;
405
- declare const Guard_isNaNValue: typeof isNaNValue;
406
- declare const Guard_isNegInfinity: typeof isNegInfinity;
407
- declare const Guard_isNonEmptyArray: typeof isNonEmptyArray;
408
- declare const Guard_isNonEmptyArrayOrUndefined: typeof isNonEmptyArrayOrUndefined;
409
- declare const Guard_isNonEmptyString: typeof isNonEmptyString;
410
- declare const Guard_isNonEmptyStringOrUndefined: typeof isNonEmptyStringOrUndefined;
411
- declare const Guard_isNotThrowing: typeof isNotThrowing;
412
- declare const Guard_isNull: typeof isNull;
413
- declare const Guard_isNullish: typeof isNullish;
414
- declare const Guard_isNumber: typeof isNumber;
415
- declare const Guard_isNumberBetween: typeof isNumberBetween;
416
- declare const Guard_isNumberBetweenExclusive: typeof isNumberBetweenExclusive;
417
- declare const Guard_isNumberOrUndefined: typeof isNumberOrUndefined;
418
- declare const Guard_isObject: typeof isObject;
419
- declare const Guard_isObjectOrUndefined: typeof isObjectOrUndefined;
420
- declare const Guard_isOddNumber: typeof isOddNumber;
421
- declare const Guard_isPosInfinity: typeof isPosInfinity;
422
- declare const Guard_isString: typeof isString;
423
- declare const Guard_isStringOrUndefined: typeof isStringOrUndefined;
424
- declare const Guard_isThrowing: typeof isThrowing;
425
- declare const Guard_isTrue: typeof isTrue;
426
- declare const Guard_isTrueOrUndefined: typeof isTrueOrUndefined;
427
- declare const Guard_isTypedObject: typeof isTypedObject;
428
- declare const Guard_isUndefined: typeof isUndefined;
429
- declare const Guard_tryOr: typeof tryOr;
430
- declare namespace Guard {
431
- export { type Guard_HasProps as HasProps, Guard_isArray as isArray, Guard_isArrayIndex as isArrayIndex, Guard_isArrayOrUndefined as isArrayOrUndefined, Guard_isBoolean as isBoolean, Guard_isBooleanOrUndefined as isBooleanOrUndefined, Guard_isDeepEqual as isDeepEqual, Guard_isEmptyArray as isEmptyArray, Guard_isEmptyArrayOrUndefined as isEmptyArrayOrUndefined, Guard_isEmptyString as isEmptyString, Guard_isEmptyStringOrUndefined as isEmptyStringOrUndefined, Guard_isEnumValue as isEnumValue, Guard_isEnumValueOrUndefined as isEnumValueOrUndefined, Guard_isEqual as isEqual, Guard_isEvenNumber as isEvenNumber, Guard_isFalse as isFalse, Guard_isFalseOrUndefined as isFalseOrUndefined, Guard_isFinite as isFinite, Guard_isFunction as isFunction, Guard_isFunctionOrUndefined as isFunctionOrUndefined, Guard_isIncluded as isIncluded, Guard_isInfinity as isInfinity, Guard_isInteger as isInteger, Guard_isIntegerBetween as isIntegerBetween, Guard_isIntegerBetweenExclusive as isIntegerBetweenExclusive, Guard_isIntegerEq as isIntegerEq, Guard_isIntegerGt as isIntegerGt, Guard_isIntegerGte as isIntegerGte, Guard_isIntegerLt as isIntegerLt, Guard_isIntegerLte as isIntegerLte, Guard_isIntegerOrUndefined as isIntegerOrUndefined, Guard_isNaNValue as isNaNValue, Guard_isNegInfinity as isNegInfinity, Guard_isNonEmptyArray as isNonEmptyArray, Guard_isNonEmptyArrayOrUndefined as isNonEmptyArrayOrUndefined, Guard_isNonEmptyString as isNonEmptyString, Guard_isNonEmptyStringOrUndefined as isNonEmptyStringOrUndefined, Guard_isNotThrowing as isNotThrowing, Guard_isNull as isNull, Guard_isNullish as isNullish, Guard_isNumber as isNumber, Guard_isNumberBetween as isNumberBetween, Guard_isNumberBetweenExclusive as isNumberBetweenExclusive, Guard_isNumberOrUndefined as isNumberOrUndefined, Guard_isObject as isObject, Guard_isObjectOrUndefined as isObjectOrUndefined, Guard_isOddNumber as isOddNumber, Guard_isPosInfinity as isPosInfinity, Guard_isString as isString, Guard_isStringOrUndefined as isStringOrUndefined, Guard_isThrowing as isThrowing, Guard_isTrue as isTrue, Guard_isTrueOrUndefined as isTrueOrUndefined, Guard_isTypedObject as isTypedObject, Guard_isUndefined as isUndefined, Guard_tryOr as tryOr };
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[]): Array<T>;
435
- declare function duplicate<T>(a: T[] | undefined): T[] | undefined;
436
- declare function removeDuplicates<T>(arr: T[], compareFn?: (a: T, b: T) => boolean): 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$6_arrayContains: typeof arrayContains;
451
- declare const index$6_chunckArray: typeof chunckArray;
452
- declare const index$6_duplicate: typeof duplicate;
453
- declare const index$6_fillArray: typeof fillArray;
454
- declare const index$6_getRangeArray: typeof getRangeArray;
455
- declare const index$6_getSequenceArray: typeof getSequenceArray;
456
- declare const index$6_isArray: typeof isArray;
457
- declare const index$6_mapRangeArray: typeof mapRangeArray;
458
- declare const index$6_mapSequenceArray: typeof mapSequenceArray;
459
- declare const index$6_removeDuplicates: typeof removeDuplicates;
460
- declare const index$6_removeDuplicatesCmp: typeof removeDuplicatesCmp;
461
- declare const index$6_toArray: typeof toArray;
462
- declare namespace index$6 {
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$5_CSSProperties = CSSProperties;
513
- declare const index$5_addClass: typeof addClass;
514
- declare const index$5_appendTo: typeof appendTo;
515
- declare const index$5_getButton: typeof getButton;
516
- declare const index$5_getCanvas: typeof getCanvas;
517
- declare const index$5_getCanvasTextWidth: typeof getCanvasTextWidth;
518
- declare const index$5_getDimension: typeof getDimension;
519
- declare const index$5_getHeight: typeof getHeight;
520
- declare const index$5_getOffset: typeof getOffset;
521
- declare const index$5_getPadding: typeof getPadding;
522
- declare const index$5_getWidth: typeof getWidth;
523
- declare const index$5_hasClass: typeof hasClass;
524
- declare const index$5_removeClass: typeof removeClass;
525
- declare const index$5_removeFromParent: typeof removeFromParent;
526
- declare const index$5_setHeight: typeof setHeight;
527
- declare const index$5_setOffset: typeof setOffset;
528
- declare const index$5_setRect: typeof setRect;
529
- declare const index$5_setVisibility: typeof setVisibility;
530
- declare const index$5_setWidth: typeof setWidth;
531
- declare const index$5_styleLayoutChanged: typeof styleLayoutChanged;
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$4_getMapKeys as getMapKeys };
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
- * <pre>
584
- * Usage:
585
- * hasProperties(obj, ["a", "b"]); // Gives type Record<string, unknown>
586
- * hasProperties(obj, ["a", "b"] as const); // Gives type Record<"a" | "b", unknown>
587
- * </pre>
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$6 as Arr, index$5 as Dom, index$8 as Enum, index_Is as Is, index$4 as Map, index$3 as Math, index$2 as Obj, index$1 as Str };
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
- * DivRect class is a rectangle (left, top, right, bottom) with an anchor point (anchorX, anchorY).
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 DivRect {
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 - DivRect.
831
+ * @returns - AnchoredRect.
818
832
  */
819
- static create(left: number, top: number, width: number, height: number): DivRect;
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 - DivRect.
841
+ * @returns - AnchoredRect.
828
842
  */
829
- static createCentered(centerX: number, centerY: number, width: number, height: number): DivRect;
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 - DivRect.
851
+ * @returns - AnchoredRect.
838
852
  */
839
- static createSections(leftw: number, rightw: number, toph: number, bottomh: number): DivRect;
853
+ static createSections(leftw: number, rightw: number, toph: number, bottomh: number): AnchoredRect;
840
854
  /**
841
- * @deprecated - Renamed to anchorX. Will be removed in v2.0.0.
842
- * @private
843
- * */
855
+ * Get center x-coordinate.
856
+ */
844
857
  get centerX(): number;
845
858
  /**
846
- * @deprecated - Renamed to anchorX. Will be removed in v2.0.0.
847
- * @private
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 - DivRect a.
896
- * @param b - DivRect b.
897
+ * @param a - AnchoredRect a.
898
+ * @param b - AnchoredRect b.
897
899
  * @returns - True/false.
898
900
  */
899
- static overlap(a: DivRect, b: DivRect): boolean;
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 - DivRect a.
904
- * @param b - DivRect b.
905
+ * @param a - AnchoredRect a.
906
+ * @param b - AnchoredRect b.
905
907
  * @returns - True/false.
906
908
  */
907
- static overlapX(a: DivRect, b: DivRect): boolean;
909
+ static overlapX(a: AnchoredRect, b: AnchoredRect): boolean;
908
910
  /**
909
911
  * Check if given rects are equal.
910
- * @param a - DivRect a.
911
- * @param b - DivRect b.
912
+ * @param a - AnchoredRect a.
913
+ * @param b - AnchoredRect b.
912
914
  * @returns - True/false.
913
915
  */
914
- static equals(a: DivRect | null | undefined, b: DivRect | null | undefined): boolean;
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: DivRect): boolean;
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 - DivRect a.
925
- * @param b - DivRect b.
926
+ * @param a - AnchoredRect a.
927
+ * @param b - AnchoredRect b.
926
928
  * @returns - True/false.
927
929
  */
928
- static equalsEdges(a: DivRect | null | undefined, b: DivRect | null | undefined): boolean;
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 DivRect.
934
+ * @param other - The other AnchoredRect.
933
935
  * @returns - True/false.
934
936
  */
935
- equalsEdges(other: DivRect): boolean;
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
- copy(): DivRect;
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 DivRect instance.
948
+ * @returns - This AnchoredRect instance.
953
949
  */
954
- offsetInPlace(dx: number, dy: number): DivRect;
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 - DivRect copy with applied offset.
956
+ * @returns - AnchoredRect copy with applied offset.
961
957
  */
962
- offsetCopy(dx: number, dy: number): DivRect;
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 - DivRect to expand this instance with.
967
- * @returns - This DivRect instance.
962
+ * @param rect - AnchoredRect to expand this instance with.
963
+ * @returns - This AnchoredRect instance.
968
964
  */
969
- expandInPlace(rect: DivRect): DivRect;
965
+ expandInPlace(rect: AnchoredRect): AnchoredRect;
970
966
  /**
971
967
  * Expand this Rect by given Rect. Immutable, returns modified copy.
972
968
  *
973
- * @param rect - DivRect to expand this instance with.
974
- * @returns - Expanded copy of this DivRect.
969
+ * @param rect - AnchoredRect to expand this instance with.
970
+ * @returns - Expanded copy of this AnchoredRect.
975
971
  */
976
- expandCopy(rect: DivRect): DivRect;
972
+ expandCopy(rect: AnchoredRect): AnchoredRect;
977
973
  /**
978
974
  * Clip this Rect by given Rect. Mmodifies this Rect.
979
975
  *
980
- * @param clipRect - DivRect to clip this instance with.
981
- * @returns - This DivRect instance.
976
+ * @param clipRect - AnchoredRect to clip this instance with.
977
+ * @returns - This AnchoredRect instance.
982
978
  */
983
- clipInPlace(clipRect: DivRect): DivRect;
979
+ clipInPlace(clipRect: AnchoredRect): AnchoredRect;
984
980
  /**
985
981
  * Clip this Rect by given Rect. Immutable, return modified copy.
986
982
  *
987
- * @param clipRect - DivRecto to clip this instance with.
988
- * @returns - Clipped DivRect copy.
983
+ * @param clipRect - AnchoredRecto to clip this instance with.
984
+ * @returns - Clipped AnchoredRect copy.
989
985
  */
990
- clipCopy(clipRect: DivRect): DivRect;
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 DivRect instance.
992
+ * @returns This AnchoredRect instance.
997
993
  */
998
- scaleInPlace(scaleX: number, scaleY?: number): DivRect;
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 DivRect.
1000
+ * @returns Scaled copy of this AnchoredRect.
1005
1001
  */
1006
- scaleCopy(scaleX: number, scaleY?: number): DivRect;
1002
+ scaleCopy(scaleX: number, scaleY?: number): AnchoredRect;
1007
1003
  /**
1008
- * Get this DivRect instance.
1009
- * @returns - This DivRect instance.
1004
+ * Get this AnchoredRect instance.
1005
+ * @returns - This AnchoredRect instance.
1010
1006
  */
1011
- getRect(): DivRect;
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 };