@infra-blocks/types 0.31.0-alpha.0 → 0.32.0-alpha.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.
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A convenience type to constrain generics on types and interfaces.
3
+ */
4
+ export type AnyRecord<K extends PropertyKey = PropertyKey> = Record<K, any>;
1
5
  /**
2
6
  * The unique symbol used for branding types.
3
7
  */
@@ -18,7 +22,7 @@ export declare const brand: unique symbol;
18
22
  * }
19
23
  * ```
20
24
  */
21
- export type Brand<T extends string | number | symbol = string | number | symbol> = {
25
+ export type Brand<T extends PropertyKey = PropertyKey> = {
22
26
  [brand]: {
23
27
  [k in T]: true;
24
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,KAAK,GAAkB,MAAM,CAAC,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAMA;;GAEG;AACU,QAAA,KAAK,GAAkB,MAAM,CAAC,SAAS,CAAC,CAAC"}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A convenience type to constrain generics on types and interfaces.
3
+ */
4
+ export type AnyRecord<K extends PropertyKey = PropertyKey> = Record<K, any>;
1
5
  /**
2
6
  * The unique symbol used for branding types.
3
7
  */
@@ -18,7 +22,7 @@ export declare const brand: unique symbol;
18
22
  * }
19
23
  * ```
20
24
  */
21
- export type Brand<T extends string | number | symbol = string | number | symbol> = {
25
+ export type Brand<T extends PropertyKey = PropertyKey> = {
22
26
  [brand]: {
23
27
  [k in T]: true;
24
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAkB,MAAM,CAAC,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAkB,MAAM,CAAC,SAAS,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infra-blocks/types",
3
- "version": "0.31.0-alpha.0",
3
+ "version": "0.32.0-alpha.0",
4
4
  "description": "Typescript types utility package.",
5
5
  "keywords": [
6
6
  "type",