How do you iterate though the TestParams tuple? I know that you can access it by index. But I want to go through each parameter type using iteration. Like a for
function auxFunction(arg1: number, arg2: string, arg3: boolean): string {
return arg1 + arg2;
}
type TestParams = Parameters<typeof auxFunction>;
Notice that if i use the following line it shows an error: ‘i’ refers to a value, but is being used as a type here. Did you mean ‘typeof i’?
let i = 0;
type ParamType = TestParams[i];