PlaceholderResolvedValue
Home > @gooddata/sdk-ui > PlaceholderResolvedValue
PlaceholderResolvedValue type
Convert any value that may contain placeholders to its resolved value type.
Signature:
export declare type PlaceholderResolvedValue<T> = T extends Array<infer A> ? Flatten<PlaceholderResolvedValue<A>>[] : T extends IPlaceholder<infer B> ? B : T extends IComposedPlaceholder<infer C, any, any> ? C : T;
References: Flatten, PlaceholderResolvedValue, IPlaceholder, IComposedPlaceholder
Remarks
Nested array placeholders resolved value types are flattened. If the type is not a placeholder, return the same type.
Example
IPlaceholder\<IAttribute\> is resolved as IAttribute
IPlaceholder\<IAttribute\>[] is resolved as IAttribute[]
IPlaceholder\<IAttribute[]\> is resolved as IAttribute[]
[IPlaceholder\<IAttribute[]\>, IPlaceholder\<IMeasure[]\>] is resolved as (IAttribute | IMeasure)[]
null is resolved as null