annotations-design-patterns
    Preparing search index...

    Function TransitionTo

    • After the method succeeds, transitions the machine to next. With no options, completion continues to call transitionTo virtually for compatibility. The reject-stale mode commits only when no base transition occurred since the method started; a conflict does not undo the method's side effects.

      Type Parameters

      • const Next extends string

      Parameters

      Returns <This extends StateMachine<string>, Args extends unknown[], Return>(
          target: (this: This, ...args: Args) => Return,
          context: ClassMethodDecoratorContext<
              This,
              (this: This, ...args: Args) => Return,
          > & ValidStates<Next, This["state"]>,
      ) => (this: This, ...args: Args) => Return