Type alias Expand<T>

Expand<T>: T extends Function
    ? T
    : T extends object
        ? T extends (infer U)[]
            ? Expand<U>[]
            : T extends Map<infer K, infer V>
                ? Map<Expand<K>, Expand<V>>
                : T extends Set<infer M>
                    ? Set<Expand<M>>
                    : {
                        [K in keyof T]: Expand<T[K]>
                    }
        : T

Recursively expands all nested properties of a type, resolving aliases so as to inspect the real shape in IDE.

Type Parameters

  • T