rattail 1.0.5 → 1.0.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/lib/index.d.cts CHANGED
@@ -30,8 +30,8 @@ declare function intersection<T>(...values: T[][]): T[];
30
30
  type Fn$2<T> = (a: T, b: T) => any;
31
31
  declare function intersectionWith<T>(...values: [...T[][], fn: Fn$2<T>]): T[];
32
32
 
33
- type Fn$1<T> = (val: T) => any;
34
- declare function groupBy<T>(arr: T[], fn: Fn$1<T>): Record<string, T[]>;
33
+ type Fn$1<T, K> = (val: T) => K;
34
+ declare function groupBy<T, K extends PropertyKey>(arr: T[], fn: Fn$1<T, K>): Record<K, T[]>;
35
35
 
36
36
  declare function pick<T, K extends keyof T>(object: T, keys: K[]): Pick<T, K>;
37
37
 
package/lib/index.d.ts CHANGED
@@ -30,8 +30,8 @@ declare function intersection<T>(...values: T[][]): T[];
30
30
  type Fn$2<T> = (a: T, b: T) => any;
31
31
  declare function intersectionWith<T>(...values: [...T[][], fn: Fn$2<T>]): T[];
32
32
 
33
- type Fn$1<T> = (val: T) => any;
34
- declare function groupBy<T>(arr: T[], fn: Fn$1<T>): Record<string, T[]>;
33
+ type Fn$1<T, K> = (val: T) => K;
34
+ declare function groupBy<T, K extends PropertyKey>(arr: T[], fn: Fn$1<T, K>): Record<K, T[]>;
35
35
 
36
36
  declare function pick<T, K extends keyof T>(object: T, keys: K[]): Pick<T, K>;
37
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rattail",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "lib/index.js",