gradum-kit - v0.1.0
    Preparing search index...

    Type Alias ReifectOnSwitchCallback<State, ClassType>

    ReifectOnSwitchCallback: (
        state: State,
        index: number,
        total: number,
        object: ClassType,
    ) => void

    Type Parameters

    • State extends KeyType

      The set of states the reifect can switch between.

    • ClassType extends object = Element

      The type of the attached object.

    Type Declaration

      • (state: State, index: number, total: number, object: ClassType): void
      • Parameters

        • state: State

          The state being switched to.

        • index: number

          The object's position among the reifect's attached objects.

        • total: number

          How many objects are attached in total, for staggering effects by index.

        • object: ClassType

          The object being switched.

        Returns void

    Called on an attached object each time the reifect switches it to a new state.