Hyperlinkv0.8.0-beta.28

Effect

Effect.TagsWithReasontypeeffect/Effect.ts:3107
TagsWithReason<E>

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.

Source effect/Effect.ts:31073 lines
export type TagsWithReason<E> = {
  [T in Tags<E>]: ReasonTags<ExtractTag<E, T>> extends never ? never : T
}[Tags<E>]
Referenced by 1 symbols