@augment-vir/core 31.43.0 → 31.43.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.
@@ -1,9 +1,9 @@
1
1
  /**
2
- * A symbol used for {@link Branded}.
2
+ * Property key used to mark {@link Branded}.
3
3
  *
4
4
  * @category Internal
5
5
  */
6
- export declare const brandedTypeTag: unique symbol;
6
+ export type BrandedTypeTag = '$_brand_$';
7
7
  /**
8
8
  * Brand any type so that it is no longer assignable to itself. For example, brand a database id
9
9
  * `string` type so that standard strings cannot be assigned to it.
@@ -22,9 +22,7 @@ export declare const brandedTypeTag: unique symbol;
22
22
  */
23
23
  export type Branded<OriginalType,
24
24
  /** The key for this brand. Two branded types with the same key will be assignable to each other. */
25
- BrandKey extends PropertyKey> = OriginalType & Readonly<{
26
- [brandedTypeTag]: Record<BrandKey, never>;
27
- }>;
25
+ BrandKey extends PropertyKey> = OriginalType & Readonly<Record<BrandedTypeTag, Record<BrandKey, never>>>;
28
26
  /**
29
27
  * Unwrap a type brand applied via {@link Branded}.
30
28
  *
@@ -1,9 +1,3 @@
1
- /**
2
- * A symbol used for {@link Branded}.
3
- *
4
- * @category Internal
5
- */
6
- export const brandedTypeTag = Symbol.for('augment-vir-core-branded-type-tag');
7
1
  /**
8
2
  * Wrap a value in a brand that matches its original type.
9
3
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/core",
3
- "version": "31.43.0",
3
+ "version": "31.43.1",
4
4
  "description": "Core augment-vir augments. Use @augment-vir/common instead.",
5
5
  "homepage": "https://github.com/electrovir/augment-vir",
6
6
  "bugs": {