Repository navigation
effect@3.17.0
Minor Changes
-
#4949
40c3c87Thanks @fubhy! - AddedRandom.fixedto create a version of theRandomservice with fixed
values for testing. -
#4949
ed2c74aThanks @dmaretskyi! - AddStruct.entriesfunction -
#4949
073a1b8Thanks @f15u! - AddLayer.mockCreates a mock layer for testing purposes. You can provide a partial
implementation of the service, and any methods not provided will
throw anUnimplementedErrordefect 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
f382e99Thanks @KhraksMamtsov! - Schedule output has been added intoCurrentIterationMetadata -
#4949
e8c7ba5Thanks @mikearnaldi! - Remove global state index by version, make version mismatch a warning message -
#4949
7e10415Thanks @devinjameson! - Array: add findFirstWithIndex function -
#4949
e9bdeceThanks @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
8d95eb0Thanks @tim-smart! - add Effect.ensure{Success,Error,Requirements}Type, for constraining Effect types