Documentation
    Preparing search index...

    Type Alias UnpackAsCollection<T, MaxDepth, Depth>

    UnpackAsCollection: T extends Collection<
        infer Resource,
        infer LocalMaxDepth,
        infer Variant,
    >
        ? InferData<
            Resource,
            Variant,
            MaxDepth extends -1 ? LocalMaxDepth : MaxDepth,
            Next[Depth],
        >[]
        : never

    Unpacks an unknown value when it is an instance of "Collection" class and also increments the depth counter

    Type Parameters

    • T
    • MaxDepth extends number
    • Depth extends number