import { Match, pipe, Predicate } from 'effect';
const match = pipe(
Match.type<string | number>(),
Match.when(Predicate.isString, () => 1 as const),
Match.when(Predicate.isNumber, () => 2 as const),
// This should never happens, so should throw a compile error
Match.orElse((_never_) => 3 as const)
);
import { Match, pipe, Predicate } from 'effect';
const match = pipe(
Match.type<string | number>(),
Match.when(Predicate.isString, () => 1 as const),
Match.when(Predicate.isNumber, () => 2 as const),
// This should never happens, so should throw a compile error
Match.orElse((_never_) => 3 as const)
);