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

    Interface ScreenItemDeclaration<Id, Input, Data, State, E, R, Actions, RL, Host, ActionEdges>

    What defineScreenItem takes: an item's id — a literal of its own, not a ScreenId — the schema of one list entry (input), its data and state, its enter, its visits and its actions. Host is the state of the screen the item is shown on, as the item's host schema decodes it (undefined when it declares none).

    interface ScreenItemDeclaration<
        Id extends ScreenItemId,
        Input,
        Data extends object,
        State,
        E,
        R,
        Actions extends object,
        RL,
        Host,
        ActionEdges extends object = Record<never, never>,
    > {
        actionEdges?: ActionEdges;
        actions: Actions;
        data: ScreenCodec<Data>;
        enter: (args: ScreenItemEnter<Input, Host>) => Effect<Data, E, R>;
        id: Id & ScreenItemIdCheck<Id>;
        input: ScreenCodec<Input, ScreenEncodedInput>;
        leave?: (left: ScreenLeave<Input, Data, State>) => Effect<void, never, RL>;
        resume?: (
            resumed: ScreenResume<Input, Data, State>,
        ) => Effect<void, never, RL>;
        state: (opened: ScreenStateArgs<Input, Data, Host>) => State;
    }

    Type Parameters

    • Id extends ScreenItemId
    • Input
    • Data extends object
    • State
    • E
    • R
    • Actions extends object
    • RL
    • Host
    • ActionEdges extends object = Record<never, never>
    Index

    Properties

    actionEdges?: ActionEdges

    The edges an action takes after the person's input, which the handle does not show (see ScreenShape.actionEdges).

    actions: Actions
    enter: (args: ScreenItemEnter<Input, Host>) => Effect<Data, E, R>
    leave?: (left: ScreenLeave<Input, Data, State>) => Effect<void, never, RL>
    resume?: (resumed: ScreenResume<Input, Data, State>) => Effect<void, never, RL>
    state: (opened: ScreenStateArgs<Input, Data, Host>) => State