Hello !
I am quite new using typescript and I need some help on typing the following code :
I would like to have an array of tuples with 2 functions, the first function is a typeguard and the second function has a parameter with the same type of the typeguard assertion. The idea is to have an array of tuples like a switch which will execute the function when the typeguard is matching and highlight the tuples not matching this rule.
Here is the type I have defined for a single tuple.
type WhenThen<T,V extends T> = [(a: T ) => a is V , (b: V) => string]
Is it even possible ?
Thank you very much !