Minor Changes
-
#4949
40c3c87
Thanks @fubhy! - AddedRandom.fixed
to create a version of theRandom
service with fixed
values for testing. -
#4949
ed2c74a
Thanks @dmaretskyi! - AddStruct.entries
function -
#4949
073a1b8
Thanks @f15u! - AddLayer.mock
Creates a mock layer for testing purposes. You can provide a partial
implementation of the service, and any methods not provided will
throw anUnimplementedError
defect when called.import { Context, Effect, Layer } from "effect" class MyService extends Context.Tag("MyService")< MyService, { one: Effect.Effect<number> two(): Effect.Effect<number> } >() {} const MyServiceTest = Layer.mock(MyService, { two: () => Effect.succeed(2) })
-
#4949
f382e99
Thanks @KhraksMamtsov! - Schedule output has been added intoCurrentIterationMetadata
-
#4949
e8c7ba5
Thanks @mikearnaldi! - Remove global state index by version, make version mismatch a warning message -
#4949
7e10415
Thanks @devinjameson! - Array: add findFirstWithIndex function -
#4949
e9bdece
Thanks @vinassefranche! - Add HashMap.countByimport { HashMap } from "effect" const map = HashMap.make([1, "a"], [2, "b"], [3, "c"]) const result = HashMap.countBy(map, (_v, key) => key % 2 === 1) console.log(result) // 2
-
#4949
8d95eb0
Thanks @tim-smart! - add Effect.ensure{Success,Error,Requirements}Type, for constraining Effect types