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

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

    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,
    > {
        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
    Index

    Properties

    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