Answer the question
In order to leave comments, you need to log in
How to get the data type of an array in the interface, but not as an array?
The question was asked very badly, but it was not possible to formulate it better.
So I'll explain better with an example. There is an interface:
IQuery<IGroup>
IQuery<IGroup[]>
export type IQuery<T extends SomeType | SomeType[]> =
OtherType<T, T extends SomeType[] ? T[0] : T, {}>;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question