Minor Changes
-
#2543
c3c12c6
Thanks @github-actions! - add SortedMap.lastOption & partition apis -
#2543
ba64ea6
Thanks @github-actions! - addTypes.DeepMutable
, an alternative toTypes.Mutable
that makes all properties recursively mutable -
#2543
b5de2d2
Thanks @github-actions! - add Effect.annotateLogsScopedThis api allows you to annotate logs until the Scope has been closed.
import { Effect } from "effect"; Effect.gen(function* () { yield* Effect.log("no annotations"); yield* Effect.annotateLogsScoped({ foo: "bar" }); yield* Effect.log("annotated with foo=bar"); }).pipe(Effect.scoped, Effect.andThen(Effect.log("no annotations again")));
-
#2543
a1c7ab8
Thanks @github-actions! - added Stream.fromEventListener, and BrowserStream.{fromEventListenerWindow, fromEventListenerDocument} for constructing a stream from addEventListener -
#2543
a023f28
Thanks @github-actions! - addkind
property toTracer.Span
This can be used to specify what kind of service created the span.
-
#2543
1c9454d
Thanks @github-actions! - add Effect.timeoutOptionReturns an effect that will return
None
if the effect times out, otherwise it
will returnSome
of the produced value.import { Effect } from "effect"; // will return `None` after 500 millis Effect.succeed("hello").pipe( Effect.delay(1000), Effect.timeoutOption("500 millis"), );
-
#2543
92d56db
Thanks @github-actions! - add $is & $match helpers to Data.TaggedEnum constructorsimport { Data } from "effect"; type HttpError = Data.TaggedEnum<{ NotFound: {}; InternalServerError: { reason: string }; }>; const { $is, $match, InternalServerError, NotFound } = Data.taggedEnum<HttpError>(); // create a matcher const matcher = $match({ NotFound: () => 0, InternalServerError: () => 1, }); // true $is("NotFound")(NotFound()); // false $is("NotFound")(InternalServerError({ reason: "fail" }));