I don't have that in mind right now, but match() might very well not properly type arrays of function predicates.
If I do that, the parameter is typed:
match([
[(x) => something(x), "value"]
], "input") // ← "input" should become the inferred value of `x`
However, in that case it might not be supported on the type level and become Parameter 'x' implicitely is any:
match([
[[(x) => something(x), (x) => somethingElse(x)], "value"]
], "input")
If that's not there, the type level should be changed from [FunctionPredicate, unknown] to [FunctionPredicate | FunctionPredicate[], unknown] which should be the fix.
I don't have that in mind right now, but
match()might very well not properly type arrays of function predicates.If I do that, the parameter is typed:
However, in that case it might not be supported on the type level and become
Parameter 'x' implicitely is any:If that's not there, the type level should be changed from
[FunctionPredicate, unknown]to[FunctionPredicate | FunctionPredicate[], unknown]which should be the fix.