IGPAPI
    Preparing search index...

    Type Alias ScreenItemListCheck<Data, List>

    ScreenItemListCheck: List extends {
        at: infer At;
        by: infer By extends PropertyKey;
        variants: infer Variants;
    }
        ? {
            at: ListFieldOf<Data>;
            by: keyof EntryAt<Data, At>;
            key: KeyFieldOf<EntryAt<Data, At>>;
            variants: {
                readonly [K in Exclude<TagsOf<EntryAt<Data, At>, By>, keyof Variants>]: ScreenItemMember
            } & {
                readonly [K in keyof Variants]: VariantCheck<
                    EntryAt<Data, At>,
                    By,
                    Variants,
                    K,
                >
            };
        }
        : List extends { at: infer At; item: infer Item }
            ? {
                at: ListFieldOf<Data>;
                item: [EntryAt<Data, At>] extends [ScreenInputOf<Item>]
                    ? ScreenItemMember
                    : { "the entries are not the item input": ScreenInputOf<Item> };
                key: KeyFieldOf<EntryAt<Data, At>>;
            }
            : { at: ListFieldOf<Data>; item: ScreenItemMember; key: string }

    What a host's item list must be, read from the list declared (List) and the host's data: at names a field of the data that holds the entries, key names the entries' identity field. A homogeneous list names its item, whose input takes every entry. A polymorphic list names its discriminant field by and the table variants from each of its values to a definition: every value the entries carry is in the table, no other is, the entries of each value are its definition's input, and no two different definitions share an id. Every error is a type error at the host.

    Type Parameters

    • Data
    • List