@vope/utils 1.6.5 → 1.6.6
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/convert/json.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 对象数组转hash
|
|
2
|
+
* 对象数组转hash
|
|
3
3
|
* @example
|
|
4
4
|
* hash8json(
|
|
5
5
|
* [
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
* 'key'
|
|
10
10
|
* ).a.value // 1
|
|
11
11
|
*/
|
|
12
|
-
export declare const hash8json: <K extends string | symbol, T extends Record<K,
|
|
12
|
+
export declare const hash8json: <K extends string | symbol, T extends Record<K, keyof any>>(list: T[], key: K) => Record<T[K], T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* 数组转hash
|
|
3
3
|
* @example
|
|
4
4
|
* hash8strings(['a', 'b']).a // 0
|
|
5
5
|
*/
|
|
6
|
-
export declare const hash8strings: <T extends
|
|
6
|
+
export declare const hash8strings: <T extends keyof any>(list: T[]) => { [P in T]: number; };
|