@naturalcycles/js-lib 14.79.0 → 14.80.0

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
@@ -24,13 +24,13 @@ export interface CreatedUpdated {
24
24
  created: number;
25
25
  updated: number;
26
26
  }
27
- export interface CreatedUpdatedId extends CreatedUpdated {
28
- id: string;
27
+ export interface CreatedUpdatedId<ID = string> extends CreatedUpdated {
28
+ id: ID;
29
29
  }
30
- export interface ObjectWithId {
31
- id: string;
30
+ export interface ObjectWithId<ID = string> {
31
+ id: ID;
32
32
  }
33
- export interface AnyObjectWithId extends AnyObject, ObjectWithId {
33
+ export interface AnyObjectWithId<ID = string> extends AnyObject, ObjectWithId<ID> {
34
34
  }
35
35
  /**
36
36
  * Convenience type shorthand.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
- "version": "14.79.0",
3
+ "version": "14.80.0",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "build-prod": "build-prod-esm-cjs",
package/src/types.ts CHANGED
@@ -29,15 +29,15 @@ export interface CreatedUpdated {
29
29
  updated: number
30
30
  }
31
31
 
32
- export interface CreatedUpdatedId extends CreatedUpdated {
33
- id: string
32
+ export interface CreatedUpdatedId<ID = string> extends CreatedUpdated {
33
+ id: ID
34
34
  }
35
35
 
36
- export interface ObjectWithId {
37
- id: string
36
+ export interface ObjectWithId<ID = string> {
37
+ id: ID
38
38
  }
39
39
 
40
- export interface AnyObjectWithId extends AnyObject, ObjectWithId {}
40
+ export interface AnyObjectWithId<ID = string> extends AnyObject, ObjectWithId<ID> {}
41
41
 
42
42
  /**
43
43
  * Convenience type shorthand.