flowGraphAsyncExecutionBlock.d.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. import type { IFlowGraphBlockConfiguration } from "./flowGraphBlock";
  2. import type { FlowGraphContext } from "./flowGraphContext";
  3. import { FlowGraphExecutionBlock } from "./flowGraphExecutionBlock";
  4. import type { FlowGraphSignalConnection } from "./flowGraphSignalConnection";
  5. /**
  6. * An async execution block can start tasks that will be executed asynchronously.
  7. * It should also be responsible for clearing it in _cancelPendingTasks.
  8. * @experimental
  9. */
  10. export declare abstract class FlowGraphAsyncExecutionBlock extends FlowGraphExecutionBlock {
  11. /**
  12. * Output connection: The signal that is triggered when the synchronous execution of this block is done.
  13. */
  14. out: FlowGraphSignalConnection;
  15. /**
  16. * Output connection: The signal that is triggered when the asynchronous execution of this block is done.
  17. */
  18. done: FlowGraphSignalConnection;
  19. constructor(config?: IFlowGraphBlockConfiguration);
  20. /**
  21. * @internal
  22. * This function can be overridden to start any
  23. * pending tasks this node might have, such as
  24. * timeouts and playing animations.
  25. * @param context
  26. */
  27. abstract _preparePendingTasks(context: FlowGraphContext): void;
  28. /**
  29. * @internal
  30. * @param context
  31. */
  32. _startPendingTasks(context: FlowGraphContext): void;
  33. abstract _cancelPendingTasks(context: FlowGraphContext): void;
  34. }