P.select() is a pattern which will always match, and will inject the selected piece of input in the handler function.
P.select()
Read the documentation for P.select on GitHub
P.select
match<{ age: number }>(value) .with({ age: P.select() }, (age) => 'age: number' ) Copy
match<{ age: number }>(value) .with({ age: P.select() }, (age) => 'age: number' )
P.select()
is a pattern which will always match, and will inject the selected piece of input in the handler function.Read the documentation for
P.select
on GitHub