@idlebox/common 1.3.14 → 1.3.15
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/common-alpha.d.ts +47 -13
- package/dist/common-beta.d.ts +47 -13
- package/dist/common-public.d.ts +47 -13
- package/dist/common.d.ts +47 -13
- package/lib/array/arrayDiff.cjs +2 -2
- package/lib/array/arrayDiff.cjs.map +1 -1
- package/lib/array/arrayDiff.js +2 -2
- package/lib/array/arrayDiff.js.map +1 -1
- package/lib/array/arraySame.cjs.map +1 -1
- package/lib/array/arraySame.js.map +1 -1
- package/lib/array/arrayUnique.cjs.map +1 -1
- package/lib/array/arrayUnique.js.map +1 -1
- package/lib/{typingHeler/deep.cjs → typingHelper/deep.partial.cjs} +1 -2
- package/lib/typingHelper/deep.partial.cjs.map +1 -0
- package/lib/typingHelper/deep.partial.js +2 -0
- package/lib/typingHelper/deep.partial.js.map +1 -0
- package/lib/typingHelper/deep.readonly.cjs +3 -0
- package/lib/typingHelper/deep.readonly.cjs.map +1 -0
- package/lib/typingHelper/deep.readonly.js +2 -0
- package/lib/typingHelper/deep.readonly.js.map +1 -0
- package/lib/typingHelper/deep.required.cjs +3 -0
- package/lib/typingHelper/deep.required.cjs.map +1 -0
- package/lib/typingHelper/deep.required.js +2 -0
- package/lib/typingHelper/deep.required.js.map +1 -0
- package/lib/typingHelper/deep.writable.cjs +3 -0
- package/lib/typingHelper/deep.writable.cjs.map +1 -0
- package/lib/typingHelper/deep.writable.js +2 -0
- package/lib/typingHelper/deep.writable.js.map +1 -0
- package/lib/typingHelper/literal.cjs +3 -0
- package/lib/typingHelper/literal.cjs.map +1 -0
- package/lib/typingHelper/literal.js +2 -0
- package/lib/typingHelper/literal.js.map +1 -0
- package/package.json +1 -1
- package/lib/typingHeler/deep.cjs.map +0 -1
- package/lib/typingHeler/deep.js +0 -3
- package/lib/typingHeler/deep.js.map +0 -1
package/dist/common-alpha.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare function addDisposableEventListener<T extends Function>(target: I
|
|
|
8
8
|
* Compare two array, returns the difference from `before` to `after`
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
export declare function arrayDiff<T>(
|
|
11
|
+
export declare function arrayDiff<T>(_before: readonly T[], after: readonly T[]): {
|
|
12
12
|
add: T[];
|
|
13
13
|
del: T[];
|
|
14
14
|
same: T[];
|
|
@@ -18,7 +18,7 @@ export declare function arrayDiff<T>(before: T[], after: T[]): {
|
|
|
18
18
|
* Returns a new array without duplicate values
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
|
-
export declare function arrayUnique<T>(arr: T[]): T[];
|
|
21
|
+
export declare function arrayUnique<T>(arr: readonly T[]): T[];
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Removes duplicate values from an array
|
|
@@ -234,18 +234,54 @@ export declare class CustomSet<Type = string> {
|
|
|
234
234
|
toArray(): Type[];
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
export declare type
|
|
238
|
-
|
|
237
|
+
export declare type DeepNonNullable<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> | Array<infer U> ? DeepNonNullableArray<U> : T extends ReadonlyMap<infer K, infer V> | Map<infer K, infer V> ? DeepNonNullableMap<K, V> : T extends ReadonlySet<infer M> ? DeepNonNullableSet<M> : DeepNonNullableObject<T>;
|
|
238
|
+
|
|
239
|
+
declare type DeepNonNullableArray<T> = Array<DeepNonNullable<T>>;
|
|
240
|
+
|
|
241
|
+
declare type DeepNonNullableMap<K, V> = Map<DeepNonNullable<K>, DeepNonNullable<V>>;
|
|
242
|
+
|
|
243
|
+
declare type DeepNonNullableObject<T> = {
|
|
244
|
+
[K in keyof T]-?: NonNullable<T[K]>;
|
|
239
245
|
};
|
|
240
246
|
|
|
241
|
-
|
|
242
|
-
|
|
247
|
+
declare type DeepNonNullableSet<T> = Set<DeepNonNullable<T>>;
|
|
248
|
+
|
|
249
|
+
export declare type DeepPartial<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> ? DeepPartialArray<U> : T extends ReadonlyMap<infer K, infer V> ? DeepPartialMap<K, V> : T extends ReadonlySet<infer M> ? DeepPartialSet<M> : DeepPartialObject<T>;
|
|
250
|
+
|
|
251
|
+
declare type DeepPartialArray<T> = Array<DeepPartial<T>>;
|
|
252
|
+
|
|
253
|
+
declare type DeepPartialMap<K, V> = Map<DeepPartial<K>, DeepPartial<V>>;
|
|
254
|
+
|
|
255
|
+
declare type DeepPartialObject<T> = {
|
|
256
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
243
257
|
};
|
|
244
258
|
|
|
245
|
-
|
|
246
|
-
|
|
259
|
+
declare type DeepPartialSet<T> = Set<DeepPartial<T>>;
|
|
260
|
+
|
|
261
|
+
export declare type DeepReadonly<T> = T extends Primitive ? T : T extends Array<infer U> ? DeepReadonlyArray<U> : T extends Map<infer K, infer V> ? DeepReadonlyMap<K, V> : T extends Set<infer M> ? DeepReadonlySet<M> : DeepReadonlyObject<T>;
|
|
262
|
+
|
|
263
|
+
declare type DeepReadonlyArray<T> = ReadonlyArray<DeepReadonly<T>>;
|
|
264
|
+
|
|
265
|
+
declare type DeepReadonlyMap<K, V> = ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>;
|
|
266
|
+
|
|
267
|
+
declare type DeepReadonlyObject<T> = {
|
|
268
|
+
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
247
269
|
};
|
|
248
270
|
|
|
271
|
+
declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
|
|
272
|
+
|
|
273
|
+
export declare type DeepWriteable<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> ? DeepWriteableArray<U> : T extends ReadonlyMap<infer K, infer V> ? DeepWriteableMap<K, V> : T extends ReadonlySet<infer M> ? DeepWriteableSet<M> : DeepWriteableObject<T>;
|
|
274
|
+
|
|
275
|
+
declare type DeepWriteableArray<T> = Array<DeepWriteable<T>>;
|
|
276
|
+
|
|
277
|
+
declare type DeepWriteableMap<K, V> = Map<DeepWriteable<K>, DeepWriteable<V>>;
|
|
278
|
+
|
|
279
|
+
declare type DeepWriteableObject<T> = {
|
|
280
|
+
-readonly [K in keyof T]: DeepWriteable<T[K]>;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
declare type DeepWriteableSet<T> = Set<DeepWriteable<T>>;
|
|
284
|
+
|
|
249
285
|
/**
|
|
250
286
|
* a promise can resolve or reject later
|
|
251
287
|
* @public
|
|
@@ -636,7 +672,7 @@ export declare function isAbsolute(path: string): boolean;
|
|
|
636
672
|
* is the two array EXACTLY same
|
|
637
673
|
* @public
|
|
638
674
|
*/
|
|
639
|
-
export declare function isArraySame<T>(a1: T[], a2: T[]): boolean;
|
|
675
|
+
export declare function isArraySame<T>(a1: readonly T[], a2: readonly T[]): boolean;
|
|
640
676
|
|
|
641
677
|
/** @public */
|
|
642
678
|
export declare function isCanceledError(error: any): boolean;
|
|
@@ -833,6 +869,8 @@ export declare class PathArray extends Set<string> {
|
|
|
833
869
|
join(part: string): string[];
|
|
834
870
|
}
|
|
835
871
|
|
|
872
|
+
export declare type Primitive = undefined | null | boolean | string | number | Function | bigint;
|
|
873
|
+
|
|
836
874
|
export declare type ProgressCallback<T = any> = (value: T) => void;
|
|
837
875
|
|
|
838
876
|
/**
|
|
@@ -1015,10 +1053,6 @@ export declare interface WrappedConsoleOptions {
|
|
|
1015
1053
|
bind?: boolean;
|
|
1016
1054
|
}
|
|
1017
1055
|
|
|
1018
|
-
export declare type Writeable<T> = {
|
|
1019
|
-
-readonly [P in keyof T]: T[P];
|
|
1020
|
-
};
|
|
1021
|
-
|
|
1022
1056
|
export declare function x(): number;
|
|
1023
1057
|
|
|
1024
1058
|
export { }
|
package/dist/common-beta.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare function addDisposableEventListener<T extends Function>(target: I
|
|
|
8
8
|
* Compare two array, returns the difference from `before` to `after`
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
export declare function arrayDiff<T>(
|
|
11
|
+
export declare function arrayDiff<T>(_before: readonly T[], after: readonly T[]): {
|
|
12
12
|
add: T[];
|
|
13
13
|
del: T[];
|
|
14
14
|
same: T[];
|
|
@@ -18,7 +18,7 @@ export declare function arrayDiff<T>(before: T[], after: T[]): {
|
|
|
18
18
|
* Returns a new array without duplicate values
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
|
-
export declare function arrayUnique<T>(arr: T[]): T[];
|
|
21
|
+
export declare function arrayUnique<T>(arr: readonly T[]): T[];
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Removes duplicate values from an array
|
|
@@ -234,18 +234,54 @@ export declare class CustomSet<Type = string> {
|
|
|
234
234
|
toArray(): Type[];
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
export declare type
|
|
238
|
-
|
|
237
|
+
export declare type DeepNonNullable<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> | Array<infer U> ? DeepNonNullableArray<U> : T extends ReadonlyMap<infer K, infer V> | Map<infer K, infer V> ? DeepNonNullableMap<K, V> : T extends ReadonlySet<infer M> ? DeepNonNullableSet<M> : DeepNonNullableObject<T>;
|
|
238
|
+
|
|
239
|
+
declare type DeepNonNullableArray<T> = Array<DeepNonNullable<T>>;
|
|
240
|
+
|
|
241
|
+
declare type DeepNonNullableMap<K, V> = Map<DeepNonNullable<K>, DeepNonNullable<V>>;
|
|
242
|
+
|
|
243
|
+
declare type DeepNonNullableObject<T> = {
|
|
244
|
+
[K in keyof T]-?: NonNullable<T[K]>;
|
|
239
245
|
};
|
|
240
246
|
|
|
241
|
-
|
|
242
|
-
|
|
247
|
+
declare type DeepNonNullableSet<T> = Set<DeepNonNullable<T>>;
|
|
248
|
+
|
|
249
|
+
export declare type DeepPartial<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> ? DeepPartialArray<U> : T extends ReadonlyMap<infer K, infer V> ? DeepPartialMap<K, V> : T extends ReadonlySet<infer M> ? DeepPartialSet<M> : DeepPartialObject<T>;
|
|
250
|
+
|
|
251
|
+
declare type DeepPartialArray<T> = Array<DeepPartial<T>>;
|
|
252
|
+
|
|
253
|
+
declare type DeepPartialMap<K, V> = Map<DeepPartial<K>, DeepPartial<V>>;
|
|
254
|
+
|
|
255
|
+
declare type DeepPartialObject<T> = {
|
|
256
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
243
257
|
};
|
|
244
258
|
|
|
245
|
-
|
|
246
|
-
|
|
259
|
+
declare type DeepPartialSet<T> = Set<DeepPartial<T>>;
|
|
260
|
+
|
|
261
|
+
export declare type DeepReadonly<T> = T extends Primitive ? T : T extends Array<infer U> ? DeepReadonlyArray<U> : T extends Map<infer K, infer V> ? DeepReadonlyMap<K, V> : T extends Set<infer M> ? DeepReadonlySet<M> : DeepReadonlyObject<T>;
|
|
262
|
+
|
|
263
|
+
declare type DeepReadonlyArray<T> = ReadonlyArray<DeepReadonly<T>>;
|
|
264
|
+
|
|
265
|
+
declare type DeepReadonlyMap<K, V> = ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>;
|
|
266
|
+
|
|
267
|
+
declare type DeepReadonlyObject<T> = {
|
|
268
|
+
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
247
269
|
};
|
|
248
270
|
|
|
271
|
+
declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
|
|
272
|
+
|
|
273
|
+
export declare type DeepWriteable<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> ? DeepWriteableArray<U> : T extends ReadonlyMap<infer K, infer V> ? DeepWriteableMap<K, V> : T extends ReadonlySet<infer M> ? DeepWriteableSet<M> : DeepWriteableObject<T>;
|
|
274
|
+
|
|
275
|
+
declare type DeepWriteableArray<T> = Array<DeepWriteable<T>>;
|
|
276
|
+
|
|
277
|
+
declare type DeepWriteableMap<K, V> = Map<DeepWriteable<K>, DeepWriteable<V>>;
|
|
278
|
+
|
|
279
|
+
declare type DeepWriteableObject<T> = {
|
|
280
|
+
-readonly [K in keyof T]: DeepWriteable<T[K]>;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
declare type DeepWriteableSet<T> = Set<DeepWriteable<T>>;
|
|
284
|
+
|
|
249
285
|
/**
|
|
250
286
|
* a promise can resolve or reject later
|
|
251
287
|
* @public
|
|
@@ -636,7 +672,7 @@ export declare function isAbsolute(path: string): boolean;
|
|
|
636
672
|
* is the two array EXACTLY same
|
|
637
673
|
* @public
|
|
638
674
|
*/
|
|
639
|
-
export declare function isArraySame<T>(a1: T[], a2: T[]): boolean;
|
|
675
|
+
export declare function isArraySame<T>(a1: readonly T[], a2: readonly T[]): boolean;
|
|
640
676
|
|
|
641
677
|
/** @public */
|
|
642
678
|
export declare function isCanceledError(error: any): boolean;
|
|
@@ -823,6 +859,8 @@ export declare class PathArray extends Set<string> {
|
|
|
823
859
|
join(part: string): string[];
|
|
824
860
|
}
|
|
825
861
|
|
|
862
|
+
export declare type Primitive = undefined | null | boolean | string | number | Function | bigint;
|
|
863
|
+
|
|
826
864
|
export declare type ProgressCallback<T = any> = (value: T) => void;
|
|
827
865
|
|
|
828
866
|
/**
|
|
@@ -1005,10 +1043,6 @@ export declare interface WrappedConsoleOptions {
|
|
|
1005
1043
|
bind?: boolean;
|
|
1006
1044
|
}
|
|
1007
1045
|
|
|
1008
|
-
export declare type Writeable<T> = {
|
|
1009
|
-
-readonly [P in keyof T]: T[P];
|
|
1010
|
-
};
|
|
1011
|
-
|
|
1012
1046
|
export declare function x(): number;
|
|
1013
1047
|
|
|
1014
1048
|
export { }
|
package/dist/common-public.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare function addDisposableEventListener<T extends Function>(target: I
|
|
|
6
6
|
* Compare two array, returns the difference from `before` to `after`
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
|
-
export declare function arrayDiff<T>(
|
|
9
|
+
export declare function arrayDiff<T>(_before: readonly T[], after: readonly T[]): {
|
|
10
10
|
add: T[];
|
|
11
11
|
del: T[];
|
|
12
12
|
same: T[];
|
|
@@ -16,7 +16,7 @@ export declare function arrayDiff<T>(before: T[], after: T[]): {
|
|
|
16
16
|
* Returns a new array without duplicate values
|
|
17
17
|
* @public
|
|
18
18
|
*/
|
|
19
|
-
export declare function arrayUnique<T>(arr: T[]): T[];
|
|
19
|
+
export declare function arrayUnique<T>(arr: readonly T[]): T[];
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Removes duplicate values from an array
|
|
@@ -232,18 +232,54 @@ export declare class CustomSet<Type = string> {
|
|
|
232
232
|
toArray(): Type[];
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
export declare type
|
|
236
|
-
|
|
235
|
+
export declare type DeepNonNullable<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> | Array<infer U> ? DeepNonNullableArray<U> : T extends ReadonlyMap<infer K, infer V> | Map<infer K, infer V> ? DeepNonNullableMap<K, V> : T extends ReadonlySet<infer M> ? DeepNonNullableSet<M> : DeepNonNullableObject<T>;
|
|
236
|
+
|
|
237
|
+
declare type DeepNonNullableArray<T> = Array<DeepNonNullable<T>>;
|
|
238
|
+
|
|
239
|
+
declare type DeepNonNullableMap<K, V> = Map<DeepNonNullable<K>, DeepNonNullable<V>>;
|
|
240
|
+
|
|
241
|
+
declare type DeepNonNullableObject<T> = {
|
|
242
|
+
[K in keyof T]-?: NonNullable<T[K]>;
|
|
237
243
|
};
|
|
238
244
|
|
|
239
|
-
|
|
240
|
-
|
|
245
|
+
declare type DeepNonNullableSet<T> = Set<DeepNonNullable<T>>;
|
|
246
|
+
|
|
247
|
+
export declare type DeepPartial<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> ? DeepPartialArray<U> : T extends ReadonlyMap<infer K, infer V> ? DeepPartialMap<K, V> : T extends ReadonlySet<infer M> ? DeepPartialSet<M> : DeepPartialObject<T>;
|
|
248
|
+
|
|
249
|
+
declare type DeepPartialArray<T> = Array<DeepPartial<T>>;
|
|
250
|
+
|
|
251
|
+
declare type DeepPartialMap<K, V> = Map<DeepPartial<K>, DeepPartial<V>>;
|
|
252
|
+
|
|
253
|
+
declare type DeepPartialObject<T> = {
|
|
254
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
241
255
|
};
|
|
242
256
|
|
|
243
|
-
|
|
244
|
-
|
|
257
|
+
declare type DeepPartialSet<T> = Set<DeepPartial<T>>;
|
|
258
|
+
|
|
259
|
+
export declare type DeepReadonly<T> = T extends Primitive ? T : T extends Array<infer U> ? DeepReadonlyArray<U> : T extends Map<infer K, infer V> ? DeepReadonlyMap<K, V> : T extends Set<infer M> ? DeepReadonlySet<M> : DeepReadonlyObject<T>;
|
|
260
|
+
|
|
261
|
+
declare type DeepReadonlyArray<T> = ReadonlyArray<DeepReadonly<T>>;
|
|
262
|
+
|
|
263
|
+
declare type DeepReadonlyMap<K, V> = ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>;
|
|
264
|
+
|
|
265
|
+
declare type DeepReadonlyObject<T> = {
|
|
266
|
+
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
245
267
|
};
|
|
246
268
|
|
|
269
|
+
declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
|
|
270
|
+
|
|
271
|
+
export declare type DeepWriteable<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> ? DeepWriteableArray<U> : T extends ReadonlyMap<infer K, infer V> ? DeepWriteableMap<K, V> : T extends ReadonlySet<infer M> ? DeepWriteableSet<M> : DeepWriteableObject<T>;
|
|
272
|
+
|
|
273
|
+
declare type DeepWriteableArray<T> = Array<DeepWriteable<T>>;
|
|
274
|
+
|
|
275
|
+
declare type DeepWriteableMap<K, V> = Map<DeepWriteable<K>, DeepWriteable<V>>;
|
|
276
|
+
|
|
277
|
+
declare type DeepWriteableObject<T> = {
|
|
278
|
+
-readonly [K in keyof T]: DeepWriteable<T[K]>;
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
declare type DeepWriteableSet<T> = Set<DeepWriteable<T>>;
|
|
282
|
+
|
|
247
283
|
/**
|
|
248
284
|
* a promise can resolve or reject later
|
|
249
285
|
* @public
|
|
@@ -634,7 +670,7 @@ export declare function isAbsolute(path: string): boolean;
|
|
|
634
670
|
* is the two array EXACTLY same
|
|
635
671
|
* @public
|
|
636
672
|
*/
|
|
637
|
-
export declare function isArraySame<T>(a1: T[], a2: T[]): boolean;
|
|
673
|
+
export declare function isArraySame<T>(a1: readonly T[], a2: readonly T[]): boolean;
|
|
638
674
|
|
|
639
675
|
/** @public */
|
|
640
676
|
export declare function isCanceledError(error: any): boolean;
|
|
@@ -821,6 +857,8 @@ export declare class PathArray extends Set<string> {
|
|
|
821
857
|
join(part: string): string[];
|
|
822
858
|
}
|
|
823
859
|
|
|
860
|
+
export declare type Primitive = undefined | null | boolean | string | number | Function | bigint;
|
|
861
|
+
|
|
824
862
|
export declare type ProgressCallback<T = any> = (value: T) => void;
|
|
825
863
|
|
|
826
864
|
/**
|
|
@@ -1003,10 +1041,6 @@ export declare interface WrappedConsoleOptions {
|
|
|
1003
1041
|
bind?: boolean;
|
|
1004
1042
|
}
|
|
1005
1043
|
|
|
1006
|
-
export declare type Writeable<T> = {
|
|
1007
|
-
-readonly [P in keyof T]: T[P];
|
|
1008
|
-
};
|
|
1009
|
-
|
|
1010
1044
|
export declare function x(): number;
|
|
1011
1045
|
|
|
1012
1046
|
export { }
|
package/dist/common.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare function addDisposableEventListener<T extends Function>(target: I
|
|
|
8
8
|
* Compare two array, returns the difference from `before` to `after`
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
export declare function arrayDiff<T>(
|
|
11
|
+
export declare function arrayDiff<T>(_before: readonly T[], after: readonly T[]): {
|
|
12
12
|
add: T[];
|
|
13
13
|
del: T[];
|
|
14
14
|
same: T[];
|
|
@@ -18,7 +18,7 @@ export declare function arrayDiff<T>(before: T[], after: T[]): {
|
|
|
18
18
|
* Returns a new array without duplicate values
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
|
-
export declare function arrayUnique<T>(arr: T[]): T[];
|
|
21
|
+
export declare function arrayUnique<T>(arr: readonly T[]): T[];
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Removes duplicate values from an array
|
|
@@ -234,18 +234,54 @@ export declare class CustomSet<Type = string> {
|
|
|
234
234
|
toArray(): Type[];
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
export declare type
|
|
238
|
-
|
|
237
|
+
export declare type DeepNonNullable<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> | Array<infer U> ? DeepNonNullableArray<U> : T extends ReadonlyMap<infer K, infer V> | Map<infer K, infer V> ? DeepNonNullableMap<K, V> : T extends ReadonlySet<infer M> ? DeepNonNullableSet<M> : DeepNonNullableObject<T>;
|
|
238
|
+
|
|
239
|
+
declare type DeepNonNullableArray<T> = Array<DeepNonNullable<T>>;
|
|
240
|
+
|
|
241
|
+
declare type DeepNonNullableMap<K, V> = Map<DeepNonNullable<K>, DeepNonNullable<V>>;
|
|
242
|
+
|
|
243
|
+
declare type DeepNonNullableObject<T> = {
|
|
244
|
+
[K in keyof T]-?: NonNullable<T[K]>;
|
|
239
245
|
};
|
|
240
246
|
|
|
241
|
-
|
|
242
|
-
|
|
247
|
+
declare type DeepNonNullableSet<T> = Set<DeepNonNullable<T>>;
|
|
248
|
+
|
|
249
|
+
export declare type DeepPartial<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> ? DeepPartialArray<U> : T extends ReadonlyMap<infer K, infer V> ? DeepPartialMap<K, V> : T extends ReadonlySet<infer M> ? DeepPartialSet<M> : DeepPartialObject<T>;
|
|
250
|
+
|
|
251
|
+
declare type DeepPartialArray<T> = Array<DeepPartial<T>>;
|
|
252
|
+
|
|
253
|
+
declare type DeepPartialMap<K, V> = Map<DeepPartial<K>, DeepPartial<V>>;
|
|
254
|
+
|
|
255
|
+
declare type DeepPartialObject<T> = {
|
|
256
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
243
257
|
};
|
|
244
258
|
|
|
245
|
-
|
|
246
|
-
|
|
259
|
+
declare type DeepPartialSet<T> = Set<DeepPartial<T>>;
|
|
260
|
+
|
|
261
|
+
export declare type DeepReadonly<T> = T extends Primitive ? T : T extends Array<infer U> ? DeepReadonlyArray<U> : T extends Map<infer K, infer V> ? DeepReadonlyMap<K, V> : T extends Set<infer M> ? DeepReadonlySet<M> : DeepReadonlyObject<T>;
|
|
262
|
+
|
|
263
|
+
declare type DeepReadonlyArray<T> = ReadonlyArray<DeepReadonly<T>>;
|
|
264
|
+
|
|
265
|
+
declare type DeepReadonlyMap<K, V> = ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>;
|
|
266
|
+
|
|
267
|
+
declare type DeepReadonlyObject<T> = {
|
|
268
|
+
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
247
269
|
};
|
|
248
270
|
|
|
271
|
+
declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
|
|
272
|
+
|
|
273
|
+
export declare type DeepWriteable<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> ? DeepWriteableArray<U> : T extends ReadonlyMap<infer K, infer V> ? DeepWriteableMap<K, V> : T extends ReadonlySet<infer M> ? DeepWriteableSet<M> : DeepWriteableObject<T>;
|
|
274
|
+
|
|
275
|
+
declare type DeepWriteableArray<T> = Array<DeepWriteable<T>>;
|
|
276
|
+
|
|
277
|
+
declare type DeepWriteableMap<K, V> = Map<DeepWriteable<K>, DeepWriteable<V>>;
|
|
278
|
+
|
|
279
|
+
declare type DeepWriteableObject<T> = {
|
|
280
|
+
-readonly [K in keyof T]: DeepWriteable<T[K]>;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
declare type DeepWriteableSet<T> = Set<DeepWriteable<T>>;
|
|
284
|
+
|
|
249
285
|
/**
|
|
250
286
|
* a promise can resolve or reject later
|
|
251
287
|
* @public
|
|
@@ -636,7 +672,7 @@ export declare function isAbsolute(path: string): boolean;
|
|
|
636
672
|
* is the two array EXACTLY same
|
|
637
673
|
* @public
|
|
638
674
|
*/
|
|
639
|
-
export declare function isArraySame<T>(a1: T[], a2: T[]): boolean;
|
|
675
|
+
export declare function isArraySame<T>(a1: readonly T[], a2: readonly T[]): boolean;
|
|
640
676
|
|
|
641
677
|
/** @public */
|
|
642
678
|
export declare function isCanceledError(error: any): boolean;
|
|
@@ -833,6 +869,8 @@ export declare class PathArray extends Set<string> {
|
|
|
833
869
|
join(part: string): string[];
|
|
834
870
|
}
|
|
835
871
|
|
|
872
|
+
export declare type Primitive = undefined | null | boolean | string | number | Function | bigint;
|
|
873
|
+
|
|
836
874
|
export declare type ProgressCallback<T = any> = (value: T) => void;
|
|
837
875
|
|
|
838
876
|
/**
|
|
@@ -1015,10 +1053,6 @@ export declare interface WrappedConsoleOptions {
|
|
|
1015
1053
|
bind?: boolean;
|
|
1016
1054
|
}
|
|
1017
1055
|
|
|
1018
|
-
export declare type Writeable<T> = {
|
|
1019
|
-
-readonly [P in keyof T]: T[P];
|
|
1020
|
-
};
|
|
1021
|
-
|
|
1022
1056
|
export declare function x(): number;
|
|
1023
1057
|
|
|
1024
1058
|
export { }
|
package/lib/array/arrayDiff.cjs
CHANGED
|
@@ -5,8 +5,8 @@ exports.arrayDiff = void 0;
|
|
|
5
5
|
* Compare two array, returns the difference from `before` to `after`
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
function arrayDiff(
|
|
9
|
-
before =
|
|
8
|
+
function arrayDiff(_before, after) {
|
|
9
|
+
const before = _before.slice().sort();
|
|
10
10
|
const add = after.slice().sort();
|
|
11
11
|
const del = [];
|
|
12
12
|
const same = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayDiff.js","sourceRoot":"","sources":["../../src/array/arrayDiff.ts"],"names":[],"mappings":";;;AASA;;;GAGG;AACH,SAAgB,SAAS,CAAI,
|
|
1
|
+
{"version":3,"file":"arrayDiff.js","sourceRoot":"","sources":["../../src/array/arrayDiff.ts"],"names":[],"mappings":";;;AASA;;;GAGG;AACH,SAAgB,SAAS,CAAI,OAAqB,EAAE,KAAmB;IACtE,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;IACtC,MAAM,GAAG,GAAQ,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;IACtC,MAAM,GAAG,GAAQ,EAAE,CAAC;IACpB,MAAM,IAAI,GAAQ,EAAE,CAAC;IACrB,IAAI,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE;QAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,EAAG,CAAC;QAC3B,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;YACzC,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE;gBACpB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAChB,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACjB,SAAS,IAAI,CAAC;aACd;SACD;QACD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACf;IACD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC;AAjBD,8BAiBC"}
|
package/lib/array/arrayDiff.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Compare two array, returns the difference from `before` to `after`
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
|
-
export function arrayDiff(
|
|
6
|
-
before =
|
|
5
|
+
export function arrayDiff(_before, after) {
|
|
6
|
+
const before = _before.slice().sort();
|
|
7
7
|
const add = after.slice().sort();
|
|
8
8
|
const del = [];
|
|
9
9
|
const same = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayDiff.js","sourceRoot":"","sources":["../../src/array/arrayDiff.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAI,
|
|
1
|
+
{"version":3,"file":"arrayDiff.js","sourceRoot":"","sources":["../../src/array/arrayDiff.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAI,OAAqB,EAAE,KAAmB;IACtE,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;IACtC,MAAM,GAAG,GAAQ,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;IACtC,MAAM,GAAG,GAAQ,EAAE,CAAC;IACpB,MAAM,IAAI,GAAQ,EAAE,CAAC;IACrB,IAAI,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE;QAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,EAAG,CAAC;QAC3B,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;YACzC,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE;gBACpB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAChB,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACjB,SAAS,IAAI,CAAC;aACd;SACD;QACD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACf;IACD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arraySame.js","sourceRoot":"","sources":["../../src/array/arraySame.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAgB,WAAW,CAAI,
|
|
1
|
+
{"version":3,"file":"arraySame.js","sourceRoot":"","sources":["../../src/array/arraySame.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAgB,WAAW,CAAI,EAAgB,EAAE,EAAgB;IAChE,IAAI,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,EAAE;QAC5B,OAAO,KAAK,CAAC;KACb;IACD,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACxC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;YACpB,OAAO,KAAK,CAAC;SACb;KACD;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAVD,kCAUC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arraySame.js","sourceRoot":"","sources":["../../src/array/arraySame.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAI,
|
|
1
|
+
{"version":3,"file":"arraySame.js","sourceRoot":"","sources":["../../src/array/arraySame.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAI,EAAgB,EAAE,EAAgB;IAChE,IAAI,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,EAAE;QAC5B,OAAO,KAAK,CAAC;KACb;IACD,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACxC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;YACpB,OAAO,KAAK,CAAC;SACb;KACD;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayUnique.js","sourceRoot":"","sources":["../../src/array/arrayUnique.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAgB,WAAW,CAAI,
|
|
1
|
+
{"version":3,"file":"arrayUnique.js","sourceRoot":"","sources":["../../src/array/arrayUnique.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAgB,WAAW,CAAI,GAAiB;IAC/C,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACjC,OAAO,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC;IACxC,CAAC,CAAC,CAAC;AACJ,CAAC;AAJD,kCAIC;AAED;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,GAAU;IAC9C,KAAK,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;QACrD,IAAI,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,EAAE;YAC1C,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SACrB;KACD;AACF,CAAC;AAND,oDAMC;AAMD,SAAS,cAAc,CAAC,CAAM;IAC7B,OAAO,CAAW,CAAC;AACpB,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,YAAY,CAAI,YAAiC,cAAc;IAC9E,MAAM,IAAI,GAA2B,EAAE,CAAC;IACxC,OAAO,SAAS,iBAAiB,CAAC,IAAO;QACxC,MAAM,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,IAAI,CAAC,EAAE,CAAC,EAAE;YACb,OAAO,KAAK,CAAC;SACb;aAAM;YACN,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;YAChB,OAAO,IAAI,CAAC;SACZ;IACF,CAAC,CAAC;AACH,CAAC;AAXD,oCAWC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayUnique.js","sourceRoot":"","sources":["../../src/array/arrayUnique.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAI,
|
|
1
|
+
{"version":3,"file":"arrayUnique.js","sourceRoot":"","sources":["../../src/array/arrayUnique.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAI,GAAiB;IAC/C,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACjC,OAAO,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC;IACxC,CAAC,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAAU;IAC9C,KAAK,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;QACrD,IAAI,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,EAAE;YAC1C,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SACrB;KACD;AACF,CAAC;AAMD,SAAS,cAAc,CAAC,CAAM;IAC7B,OAAO,CAAW,CAAC;AACpB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAI,YAAiC,cAAc;IAC9E,MAAM,IAAI,GAA2B,EAAE,CAAC;IACxC,OAAO,SAAS,iBAAiB,CAAC,IAAO;QACxC,MAAM,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,IAAI,CAAC,EAAE,CAAC,EAAE;YACb,OAAO,KAAK,CAAC;SACb;aAAM;YACN,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;YAChB,OAAO,IAAI,CAAC;SACZ;IACF,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep.partial.js","sourceRoot":"","sources":["../../src/typingHelper/deep.partial.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep.partial.js","sourceRoot":"","sources":["../../src/typingHelper/deep.partial.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep.readonly.js","sourceRoot":"","sources":["../../src/typingHelper/deep.readonly.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep.readonly.js","sourceRoot":"","sources":["../../src/typingHelper/deep.readonly.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep.required.js","sourceRoot":"","sources":["../../src/typingHelper/deep.required.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep.required.js","sourceRoot":"","sources":["../../src/typingHelper/deep.required.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep.writable.js","sourceRoot":"","sources":["../../src/typingHelper/deep.writable.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep.writable.js","sourceRoot":"","sources":["../../src/typingHelper/deep.writable.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"literal.js","sourceRoot":"","sources":["../../src/typingHelper/literal.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"literal.js","sourceRoot":"","sources":["../../src/typingHelper/literal.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deep.js","sourceRoot":"","sources":["../../src/typingHeler/deep.ts"],"names":[],"mappings":";;AAYA,sBAAsB"}
|
package/lib/typingHeler/deep.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deep.js","sourceRoot":"","sources":["../../src/typingHeler/deep.ts"],"names":[],"mappings":";AAYA,sBAAsB"}
|