IGPAPI
    Preparing search index...

    Interface ScreenDefinition<Id, Kind, Input, Data, State, E, R, Actions, Items>

    A screen declaration. The engine reads it when the screen is opened; the declaration itself sends nothing.

    interface ScreenDefinition<
        Id extends ScreenId,
        Kind extends EnterableScreenKind,
        Input,
        Data extends object,
        State,
        E,
        R,
        Actions extends object,
        Items extends object,
    > {
        actions: Actions;
        data: ScreenCodec<Data>;
        enter: (args: ScreenEnterArgs<Kind, Input>) => Effect<Data, E, R>;
        id: Id;
        input: ScreenCodec<Input, ScreenEncodedInput>;
        items: Items | undefined;
        kind: Kind;
        leave:
            | ((left: ScreenLeave<Input, Data, State>) => Effect<void, never, R>)
            | undefined;
        resume:
            | (
                (resumed: ScreenLeave<Input, Data, State>) => Effect<void, never, R>
            )
            | undefined;
        state: ScreenStateOf<Input, Data, State>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    actions: Actions

    What enter returns: the user's data, flat on the handle; never in a trail.

    enter: (args: ScreenEnterArgs<Kind, Input>) => Effect<Data, E, R>
    id: Id

    What an edge passes to enter — for an item, the schema of one list entry.

    items: Items | undefined

    Absent when the screen shows no item lists.

    kind: Kind
    leave:
        | ((left: ScreenLeave<Input, Data, State>) => Effect<void, never, R>)
        | undefined

    What the engine runs each time the thing stops being on top — covered by another screen, closed, or left by a tab switch — after the transition that did it committed. It cannot fail; absent when the thing does nothing then.

    resume:
        | ((resumed: ScreenLeave<Input, Data, State>) => Effect<void, never, R>)
        | undefined

    What the engine runs each time the thing is on top again after a leave — the screen that covered it was closed — after that transition committed. Never on the first show (that is enter), never after a rolled-back transition. It cannot fail; absent when the thing does nothing then.

    What continuing from it needs, from its input and data.