IGPAPI
    Preparing search index...

    Type Alias StateFitsActions<Actions, State>

    StateFitsActions: {
        readonly [K in keyof Actions]: Actions[K] extends (
            self: ScreenHandle,
            state: infer Taken,
        ) => unknown
            ? [Taken] extends [never] ? never : [State] extends [Taken] ? never : K
            : never
    }[keyof Actions] extends infer Misfit
        ? [Misfit] extends [never]
            ? unknown
            : { "these actions do not take the state": Misfit }
        : unknown

    Every action and edge takes the state the definition derives: the engine hands each the state state returned. An action whose state parameter does not accept it is a type error in the platform's screenSet, which names the actions — for a screen and for every item its lists show. It is not checked where the definition is declared: there, a check naming the state would make the inference of definitions that lead to each other circular.

    Type Parameters

    • Actions
    • State