devtypes - v2.1.0
    Preparing search index...

    Type Alias ListNoMissingType<L, T>

    ListNoMissingType: (T extends any ? If<IsTypeInList<T, L>, true, false> : never) extends true
        ? L
        : never

    Validate that every type in T is present in tuple L.

    Type Parameters

    • L extends readonly any[]

      Tuple to validate

    • T

      Union of required element types

    This will check if each type in the union T can be found in the tuple L using IsTypeInList. If all types in T are found in L, this resolves to L. If any type in T is missing from L, this resolves to never.

    type Full = ListNoMissingType< [ 'a', 'b', 'c' ], 'a' | 'b' | 'c' >;  // [ 'a', 'b', 'c' ]
    type Missing = ListNoMissingType< [ 'a', 'c' ], 'a' | 'b' | 'c' >; // never