@effect/data
Advanced tools
Comparing version 0.5.1 to 0.6.0
@@ -43,4 +43,3 @@ /** | ||
/** | ||
* A generic interface that defines a branded type. It contains a `unique symbol` property `[BrandTypeId]` with a `string` property, | ||
* which represents the brand. | ||
* A generic interface that defines a branded type. | ||
* | ||
@@ -50,3 +49,3 @@ * @since 1.0.0 | ||
*/ | ||
export interface Brand<in out K extends string> { | ||
export interface Brand<in out K extends string | symbol> { | ||
readonly [BrandTypeId]: { | ||
@@ -126,3 +125,3 @@ readonly [k in K]: K; | ||
type Brands<P> = P extends Brand<any> ? Brand.UnionToIntersection<{ | ||
[k in keyof P[BrandTypeId]]: k extends string ? Brand<k> : never; | ||
[k in keyof P[BrandTypeId]]: k extends string | symbol ? Brand<k> : never; | ||
}[keyof P[BrandTypeId]]> : never; | ||
@@ -129,0 +128,0 @@ /** |
{ | ||
"name": "@effect/data", | ||
"version": "0.5.1", | ||
"version": "0.6.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -50,4 +50,3 @@ /** | ||
/** | ||
* A generic interface that defines a branded type. It contains a `unique symbol` property `[BrandTypeId]` with a `string` property, | ||
* which represents the brand. | ||
* A generic interface that defines a branded type. | ||
* | ||
@@ -57,3 +56,3 @@ * @since 1.0.0 | ||
*/ | ||
export interface Brand<in out K extends string> { | ||
export interface Brand<in out K extends string | symbol> { | ||
readonly [BrandTypeId]: { | ||
@@ -139,3 +138,3 @@ readonly [k in K]: K | ||
{ | ||
[k in keyof P[BrandTypeId]]: k extends string ? Brand<k> | ||
[k in keyof P[BrandTypeId]]: k extends string | symbol ? Brand<k> | ||
: never | ||
@@ -142,0 +141,0 @@ }[keyof P[BrandTypeId]] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3498865
74546