A few bug fixes regarding type inference:
- Improved support for readonly inputs
- Fix a bug with exhaustive matching: string and number literals (like
"hello"
or2
) where inferred asstring
andnumber
. When patterns were containing literals, the pattern matching expression was considered exhaustive, even though it wasn't. - Fix an inference issue with
any
: If anany
type was contained in your input data structure, ts-pattern was sometimes unable to infer which branch of the input type was matching your pattern.