@naturalcycles/js-lib 15.59.0 → 15.59.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/dist/types.d.ts CHANGED
@@ -291,14 +291,14 @@ export declare const _stringMapEntries: <T>(map: StringMap<T>) => [k: string, v:
291
291
  * Alias of `Object.keys`, but returns keys typed as `keyof T`, not as just `string`.
292
292
  * This is how TypeScript should work, actually.
293
293
  */
294
- export declare const _objectKeys: <K extends PropertyKey>(obj: Record<K, any>) => K[];
294
+ export declare const _objectKeys: <K extends PropertyKey>(obj: Partial<Record<K, any>>) => K[];
295
295
  /**
296
296
  * Alias of `Object.entries`, but returns better-typed output.
297
297
  *
298
298
  * So e.g you can use _objectEntries(obj).map([k, v] => {})
299
299
  * and `k` will be `keyof obj` instead of generic `string`.
300
300
  */
301
- export declare const _objectEntries: <K extends PropertyKey, V>(obj: Record<K, V>) => [k: K, v: V][];
301
+ export declare const _objectEntries: <K extends PropertyKey, V>(obj: Partial<Record<K, V>>) => [k: K, v: V][];
302
302
  export type NullishValue = null | undefined;
303
303
  export type FalsyValue = false | '' | 0 | null | undefined;
304
304
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
3
  "type": "module",
4
- "version": "15.59.0",
4
+ "version": "15.59.1",
5
5
  "dependencies": {
6
6
  "tslib": "^2",
7
7
  "undici": "^7",
package/src/types.ts CHANGED
@@ -364,7 +364,9 @@ export const _stringMapEntries = Object.entries as <T>(map: StringMap<T>) => [k:
364
364
  * Alias of `Object.keys`, but returns keys typed as `keyof T`, not as just `string`.
365
365
  * This is how TypeScript should work, actually.
366
366
  */
367
- export const _objectKeys = Object.keys as <K extends PropertyKey>(obj: Record<K, any>) => K[]
367
+ export const _objectKeys = Object.keys as <K extends PropertyKey>(
368
+ obj: Partial<Record<K, any>>,
369
+ ) => K[]
368
370
 
369
371
  /**
370
372
  * Alias of `Object.entries`, but returns better-typed output.
@@ -373,7 +375,7 @@ export const _objectKeys = Object.keys as <K extends PropertyKey>(obj: Record<K,
373
375
  * and `k` will be `keyof obj` instead of generic `string`.
374
376
  */
375
377
  export const _objectEntries = Object.entries as <K extends PropertyKey, V>(
376
- obj: Record<K, V>,
378
+ obj: Partial<Record<K, V>>,
377
379
  ) => [k: K, v: V][]
378
380
 
379
381
  export type NullishValue = null | undefined