effect-io-ai

Package: effect
Module: Match

Match.Types.Without

Represents a filter that excludes specific types from a union.

Details

Without is used internally to track which types should be excluded from consideration during pattern matching. It helps implement the type-level logic for Match.not and other exclusion operations.

Example (Tracking excluded types)

import { Match } from "effect"

// Without is used internally when you write:
Match.type<string | number | boolean>().pipe(
  Match.not(Match.string, (value) => `not string: ${value}`),
  // At this point, type system uses Without<string> to track exclusion
  Match.orElse(() => "was a string")
)

Signature

export interface Without<out X> {
    readonly _tag: "Without"
    readonly _X: X
  }

Source

Since v4.0.0