@nu-art/ts-common 0.400.6 → 0.400.7
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/package.json +1 -1
- package/utils/array-tools.d.ts +1 -7
package/package.json
CHANGED
package/utils/array-tools.d.ts
CHANGED
|
@@ -49,13 +49,7 @@ export declare function filterFalsy<T>(array?: (T | undefined | null | void)[]):
|
|
|
49
49
|
/**
|
|
50
50
|
* receives array and builds hashmap whom keys are decided via function and values are from array
|
|
51
51
|
* */
|
|
52
|
-
export declare function arrayToMap<T>(array: T[] | Readonly<T[]>, getKey: (item: T, index: number, map:
|
|
53
|
-
[k: string]: T;
|
|
54
|
-
}) => string | number | (string | number)[], map?: {
|
|
55
|
-
[k: string]: T;
|
|
56
|
-
}): {
|
|
57
|
-
[k: string]: T;
|
|
58
|
-
};
|
|
52
|
+
export declare function arrayToMap<T>(array: T[] | Readonly<T[]>, getKey: (item: T, index: number, map: TypedMap<T>) => string | number | (string | number)[], map?: TypedMap<T>): TypedMap<T>;
|
|
59
53
|
type KeyResolver<Input, Output = Input> = (item: Input, index: number, map: {
|
|
60
54
|
[k: string]: Output;
|
|
61
55
|
}) => string | number | (string | number)[];
|