Type Utils
    Preparing search index...

    Type Alias GenericStruct<T, UnionOrIntersection, Rules>

    GenericStruct: T extends Function
        ? V3.AnyStruct<Rules> & { schema: TypeGuard<T> }
        :
            | V3.Struct<T, Rules>
            | V3.CustomStruct<T, Rules>
            | (
                UnionOrIntersection extends false
                    ? never
                    : UnionOrIntersection extends "union"
                        ? T extends any[] ? V3.UnionStruct<T, Rules> : never
                        : UnionOrIntersection extends "intersection"
                            ? T extends any[] ? V3.IntersectionStruct<T, Rules> : never
                            : T extends any[]
                                ? V3.UnionStruct<T, Rules>
                                | V3.IntersectionStruct<T, Rules>
                                : never
            )

    Type Parameters

    • T = any
    • UnionOrIntersection extends "union" | "intersection" | true | false = true
    • Rules extends Custom<any[], string, any> = Custom<any[], string, any>