Reputation: 1955
I am using variables of the following type in typescript:
[[string, string], string][]
Is there a way to define this as type so I don't have to repeat this definition everywhere in my code?
Upvotes: 1
Views: 931
Reputation: 31924
You can define a type
:
type stringTuple = [[string, string], string][];
And then later use it similar to how you would use a class or interface:
var array: stringTuple;
Upvotes: 4