@effect/data
Advanced tools
Comparing version 0.10.0 to 0.10.1
@@ -41,3 +41,3 @@ /** | ||
readonly left: E; | ||
traced<E, A>(this: Either<E, A>, trace: Trace): Either<E, A> | TracedEither<E, A>; | ||
traced(this: this, trace: Trace): this | TracedEither<this["left"], never>; | ||
} | ||
@@ -51,3 +51,3 @@ /** | ||
readonly right: A; | ||
traced<E, A>(this: Either<E, A>, trace: Trace): Either<E, A> | TracedEither<E, A>; | ||
traced(this: this, trace: Trace): this | TracedEither<never, this["right"]>; | ||
} | ||
@@ -54,0 +54,0 @@ /** |
@@ -43,3 +43,3 @@ /** | ||
readonly _tag: "None"; | ||
traced(this: Option<never>, trace: Trace): Option<never> | TracedOption<never>; | ||
traced(this: this, trace: Trace): this | TracedOption<never>; | ||
} | ||
@@ -53,3 +53,3 @@ /** | ||
readonly value: A; | ||
traced(this: Option<A>, trace: Trace): Option<A> | TracedOption<A>; | ||
traced(this: this, trace: Trace): this | TracedOption<this["value"]>; | ||
} | ||
@@ -56,0 +56,0 @@ /** |
{ | ||
"name": "@effect/data", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -52,6 +52,6 @@ /** | ||
readonly left: E | ||
traced<E, A>( | ||
this: Either<E, A>, | ||
traced( | ||
this: this, | ||
trace: Trace | ||
): Either<E, A> | TracedEither<E, A> | ||
): this | TracedEither<this["left"], never> | ||
} | ||
@@ -66,6 +66,6 @@ | ||
readonly right: A | ||
traced<E, A>( | ||
this: Either<E, A>, | ||
traced( | ||
this: this, | ||
trace: Trace | ||
): Either<E, A> | TracedEither<E, A> | ||
): this | TracedEither<never, this["right"]> | ||
} | ||
@@ -72,0 +72,0 @@ |
@@ -41,3 +41,6 @@ /** | ||
} | ||
traced<E, A>(this: Either.Either<E, A>, trace: Trace): Either.TracedEither<E, A> | Either.Either<E, A> { | ||
traced( | ||
this: this, | ||
trace: Trace | ||
): this | Either.TracedEither<never, this["right"]> { | ||
if (trace) { | ||
@@ -51,3 +54,3 @@ return makeTraced(this, trace) | ||
/** @internal */ | ||
export class Left<A> implements Either.Left<A> { | ||
export class Left<E> implements Either.Left<E> { | ||
readonly _tag = "Left" | ||
@@ -59,3 +62,3 @@ public i1 = undefined | ||
[Equal.symbol](this: this, that: unknown) { | ||
return isEither(that) && isLeft(that) && (that as unknown as Left<A>).i0 === this.i0 | ||
return isEither(that) && isLeft(that) && (that as unknown as Left<E>).i0 === this.i0 | ||
} | ||
@@ -68,5 +71,8 @@ [Hash.symbol](this: this) { | ||
} | ||
constructor(readonly i0: A) { | ||
constructor(readonly i0: E) { | ||
} | ||
traced<E, A>(this: Either.Either<E, A>, trace: Trace): Either.TracedEither<E, A> | Either.Either<E, A> { | ||
traced( | ||
this: this, | ||
trace: Trace | ||
): this | Either.TracedEither<this["left"], never> { | ||
if (trace) { | ||
@@ -73,0 +79,0 @@ return makeTraced(this, trace) |
@@ -27,3 +27,3 @@ /** | ||
[EffectTypeId] = effectVariance; | ||
[Equal.symbol](this: this, that: unknown) { | ||
[Equal.symbol](this: this, that: unknown): boolean { | ||
return isOption(that) && isSome(that) && (that as Some<A>).i0 === this.i0 | ||
@@ -39,3 +39,3 @@ } | ||
} | ||
traced(this: this, trace: Trace): Option.TracedOption<A> | this { | ||
traced(this: this, trace: Trace): Option.TracedOption<this["value"]> | this { | ||
if (trace) { | ||
@@ -56,3 +56,3 @@ return makeTraced(this, trace) | ||
[EffectTypeId] = effectVariance; | ||
[Equal.symbol](this: this, that: unknown) { | ||
[Equal.symbol](this: this, that: unknown): boolean { | ||
return isOption(that) && isNone(that) | ||
@@ -59,0 +59,0 @@ } |
@@ -56,5 +56,5 @@ /** | ||
traced( | ||
this: Option<never>, | ||
this: this, | ||
trace: Trace | ||
): Option<never> | TracedOption<never> | ||
): this | TracedOption<never> | ||
} | ||
@@ -70,5 +70,5 @@ | ||
traced( | ||
this: Option<A>, | ||
this: this, | ||
trace: Trace | ||
): Option<A> | TracedOption<A> | ||
): this | TracedOption<this["value"]> | ||
} | ||
@@ -75,0 +75,0 @@ |
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
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
76978
3624550