igpapi — Instagram private API Simulator for Node.js (API reference) 4.14.0
    Preparing search index...

    Type Alias ScreenItemDefinition<Id, Input, Data, State, E, R, Actions, Host, Top>

    ScreenItemDefinition: ScreenShape<
        Id,
        "item",
        Input,
        Data,
        State,
        E,
        R,
        Actions,
        Host,
        Top,
    > & {
        host: ScreenCodec<Host, unknown>
        | undefined;
        is: (
            value: unknown,
        ) => value is ScreenInstance<
            ScreenShape<Id, "item", Input, Data, State, E, R, Actions, Host, Top>,
        >;
    }

    An item definition: what defineScreenItem returns and a host's item list names.

    Type Parameters

    • Id extends ScreenItemId
    • Input
    • Data extends object
    • State
    • E
    • R
    • Actions extends object
    • Host = undefined
    • Top extends PropertyKey = never

    Type Declaration

    • Readonlyhost: ScreenCodec<Host, unknown> | undefined

      The schema of the state of the screen the item is shown on, which the item's state reads (host): the item's actions see the host's facts — the thread a message belongs to — without a copy of them in each entry. Absent when the item reads nothing of its host. The host screen's state must fit it: a misfit is a type error in the platform's screenSet.

    • Readonlyis: (
          value: unknown,
      ) => value is ScreenInstance<
          ScreenShape<Id, "item", Input, Data, State, E, R, Actions, Host, Top>,
      >

      Whether value is this item's handle: the narrowing of a union of item handles — the same guard a screen definition carries, written XxxItem.is(handle).