import { Match, Predicate } from 'effect';
Match.value([1, 2, 3, 4]).pipe(
Match.when(Predicate.isTupleOf(1), ([a]) => a), // a is inferred as unknown instead of number
Match.orElse(() => 1)
);
Match.type<number[]>().pipe(
Match.when(Predicate.isTupleOf(1), ([a]) => a), // a is inferred as unknown instead of number
Match.orElse(() => 1)
);
import { Match, Predicate } from 'effect';
Match.value([1, 2, 3, 4]).pipe(
Match.when(Predicate.isTupleOf(1), ([a]) => a), // a is inferred as unknown instead of number
Match.orElse(() => 1)
);
Match.type<number[]>().pipe(
Match.when(Predicate.isTupleOf(1), ([a]) => a), // a is inferred as unknown instead of number
Match.orElse(() => 1)
);