Experimental
A Matchable is an object implementing the Matcher Protocol. It must have a [P.matcher]: P.Matcher<NarrowFn> key, which defines how this object should be matched by TS-Pattern.
Matchable
[P.matcher]: P.Matcher<NarrowFn>
Note that this api is unstable.
class Some<T> implements P.unstable_Matchable { [P.matcher](): P.unstable_Matcher<Some<T>>} Copy
class Some<T> implements P.unstable_Matchable { [P.matcher](): P.unstable_Matcher<Some<T>>}
A
Matchable
is an object implementing the Matcher Protocol. It must have a[P.matcher]: P.Matcher<NarrowFn>
key, which defines how this object should be matched by TS-Pattern.Note that this api is unstable.