1

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?

1 Answer 1

4

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;
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! Unfortunately it's hard to find this in the typescript documentation. I would expect at least a language reference with an index of keywords.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.