Yes it is. In TypeScript, you do this using array types in a simple way by creating tuples.
type StringKeyValuePair = [string, string];
You can do what you want by naming the array:
function f(xs: [number, number, number]) {}
But you would not specify an intermediate parameter. Another possibility is to use pair destructuring:
function f([a,b,c]: [number, number, number]) {}
Marcelo camargo
source share