@guillaume-docquier/tools-ts 8.5.0 → 8.6.1

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/README.md CHANGED
@@ -106,14 +106,14 @@ consistent context, scopes, formatting, and redaction.
106
106
  Use these small utilities to keep common asynchronous and callback patterns
107
107
  consistent.
108
108
 
109
- | Export | What it is | Use it when |
110
- | ----------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------- |
111
- | `setTimeoutAsync` | Promise-based timeout helper. | You want `await`-friendly delays that work in browser and Node environments. |
112
- | `debounce` | Creates a debounced callback. | A repeated event should trigger work only after calls have settled for a delay. |
113
- | `noop` | Synchronous no-op function. | You need a safe default callback that intentionally does nothing. |
114
- | `asyncNoop` | Asynchronous no-op function. | You need a safe default async callback or hook that resolves immediately. |
115
- | `omit` | Runtime equivalent of `Omit<TType, TKey>`. | You need to remove keys from an object. |
116
- | `indexBy` | Indexes objects by a selected string-valued property. | You need to look up objects by a string key. |
109
+ | Export | What it is | Use it when |
110
+ | ----------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------- |
111
+ | `setTimeoutAsync` | Promise-based timeout helper. | You want `await`-friendly delays that work in browser and Node environments. |
112
+ | `debounce` | Creates a debounced callback. | A repeated event should trigger work only after calls have settled for a delay. |
113
+ | `noop` | Synchronous no-op function. | You need a safe default callback that intentionally does nothing. |
114
+ | `asyncNoop` | Asynchronous no-op function. | You need a safe default async callback or hook that resolves immediately. |
115
+ | `omit` | Runtime equivalent of `Omit<TType, TKey>`. | You need to remove keys from an object. |
116
+ | `indexBy` | Indexes objects by a selected string or number valued property. | You need to look up objects by a key. |
117
117
 
118
118
  ### Profiling
119
119
 
package/dist/indexBy.d.ts CHANGED
@@ -11,4 +11,4 @@
11
11
  * // }
12
12
  * ```
13
13
  */
14
- export declare function indexBy<TProperty extends string, TElement extends Record<TProperty, string>>(property: TProperty, arrayOfObjects: readonly TElement[]): Record<TElement[TProperty], TElement>;
14
+ export declare function indexBy<TProperty extends string, TElement extends Record<TProperty, string | number>>(property: TProperty, arrayOfObjects: readonly TElement[]): Record<TElement[TProperty], TElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guillaume-docquier/tools-ts",
3
- "version": "8.5.0",
3
+ "version": "8.6.1",
4
4
  "description": "My personal collection of typescript tools",
5
5
  "homepage": "https://github.com/Guillaume-Docquier/tools-ts",
6
6
  "license": "MIT",