effect@3.4.6
·
2021 commits
to main
since this release
Patch Changes
-
#3096
5c0ceb0Thanks @gcanti! - Micro: align withEffectmodule (renamings and new combinators).General naming convention rule:
<reference module (start with lowercase)><api (start with Uppercase)>.Failure->MicroCauseFailure.Expected<E>->MicroCause.Fail<E>Failure.Unexpected->MicroCause.DieFailure.Aborted->MicroCause.InterruptFailureExpected->causeFailFailureUnexpected->causeDieFailureAborted->causeInterruptfailureIsExpected->causeIsFailfailureIsExpected->causeIsFailfailureIsUnexpected->causeIsDiefailureIsAborted->causeIsInterruptfailureSquash->causeSquashfailureWithTrace->causeWithTrace
Result->MicroExitResultAborted->exitInterruptResultSuccess->exitSucceedResultFail->exitFailResultFailUnexpected->exitDieResultFailWith->exitFailCauseresultIsSuccess->exitIsSuccessresultIsFailure->exitIsFailureresultIsAborted->exitIsInterruptresultIsFailureExpected->exitIsFailresultIsFailureUnexpected->exitIsDieresultVoid->exitVoid
DelayFn->MicroScheduledelayExponential->scheduleExponentialdelaySpaced->scheduleSpaceddelayWithMax->scheduleWithMaxDelaydelayWithMaxElapsed->scheduleWithMaxElapseddelayWithRecurs->scheduleRecursand make it a constructor- add
scheduleAddDelaycombinator - add
scheduleUnioncombinator - add
scheduleIntersectcombinator
Handleabort->interruptunsafeAbort->unsafeInterrupt
provideServiceMicro->provideServiceEffectfromResult->fromExitfromResultSync->fromExitSyncfailWith->failCausefailWithSync->failCauseSyncasResult->exitfilterOrFailWith->filterOrFailCauserepeatResult->repeatExitcatchFailure->catchAllCausecatchFailureIf->catchCauseIfcatchExpected->catchAllcatchUnexpected->catchAllDefecttapFailure->tapErrorCausetapFailureIf->tapErrorCauseIftapExpected->tapErrortapUnexpected->tapDefectmapFailure->mapErrorCausematchFailureMicro->matchCauseEffectmatchFailure->matchCausematchMicro->matchEffectonResult->onExitonResultIf->onExitIfonFailure->onErroronAbort->onInterruptabort->interruptrunPromiseResult->runPromiseExitrunSyncResult->runSyncExit- rename
delayoption toschedule
-
#3096
5c0ceb0Thanks @gcanti! - Micro: renametimeouttotimeoutOption, and add atimeoutthat fails with aTimeoutException -
#3121
33735b1Thanks @KhraksMamtsov! - Support for the tacit usage of external handlers forMatch.tagandMatch.tagStartsWithfunctionstype Value = { _tag: "A"; a: string } | { _tag: "B"; b: number }; const handlerA = (_: { _tag: "A"; a: number }) => _.a; // $ExpectType string | number pipe( M.type<Value>(), M.tag("A", handlerA), // <-- no type issue M.orElse((_) => _.b), )(value);
-
#3096
5c0ceb0Thanks @gcanti! - Micro: move MicroExit types to a namespace -
#3134
139d4b3Thanks @tim-smart! - use Channel.acquireUseRelease for Channel.withSpan