Patch Changes
-
#4412
e30f132
Thanks @KhraksMamtsov! - Fix STM unification -
#4403
33fa667
Thanks @gcanti! - Duration: fixformat
output when the input is zero.Before
import { Duration } from "effect" console.log(Duration.format(Duration.zero)) // Output: ""
After
import { Duration } from "effect" console.log(Duration.format(Duration.zero)) // Output: "0"
-
#4411
87f5f28
Thanks @gcanti! - EnhanceTagClass
andReferenceClass
to enforcekey
type narrowing, closes #4409.The
key
property inTagClass
andReferenceClass
now correctly retains its specific string value, just like inEffect.Service
import { Context, Effect } from "effect" // ------------------------------------------------------------------------------------- // `key` field // ------------------------------------------------------------------------------------- class A extends Effect.Service<A>()("A", { succeed: { a: "value" } }) {} // $ExpectType "A" A.key class B extends Context.Tag("B")<B, { a: "value" }>() {} // $ExpectType "B" B.key class C extends Context.Reference<C>()("C", { defaultValue: () => 0 }) {} // $ExpectType "C" C.key
-
#4397
4dbd170
Thanks @thewilkybarkid! - Make Array.makeBy dual