Package: effect
Module: Effect
Type helper that keeps only error tags whose tagged error contains a tagged reason field.
When to use
Use to constrain custom helpers or overloads to parent error tags whose error contains a tagged reason.
Details
The mapped type keeps each parent error tag whose extracted tagged error has at least one reason tag, and removes tags that do not carry tagged reasons.
See
unwrapReason for promoting nested reason errors into the error channelcatchReason for handling one nested reason tagcatchReasons for handling several nested reason tagsSignature
type TagsWithReason<E> = {
[T in Tags<E>]: ReasonTags<ExtractTag<E, T>> extends never ? never : T
}[Tags<E>]
Since v4.0.0