M
M
MaximPatrushev2019-09-02 21:24:38
typescript
MaximPatrushev, 2019-09-02 21:24:38

How in typescript to describe an interface representing an array of two elements of elements of different types?

There is an array, always consisting of only two elements. The first element is a string, the second is an object that has its own interface. How to describe the interface in typescript for such an array?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stockholm Syndrome, 2019-09-02
@MaximPatrushev

type SomeType = [string, IInterface];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question