type Foo = number | string
function f<Type extends Foo>(v: Type[]) {
// can I act here in function of Type?
// pseudo-code: if (Type == number) {} else if (Type == string) {}
}
f<number>([1, 2]);
I'm a typescript beginner so this question is probably very naive