Flatten
Home > @gooddata/sdk-ui > Flatten
Flatten type
Flatten array type.
Signature:
export type Flatten<T> = T extends Array<infer A> ? A : T;
Remarks
If the type is not an array, return the same type. Works only for 1 level, nested array types are not recursively flattened.
Example
number[] is resolved as number
string[][] is resolved as string[]
string is resolved as string