Skip to content

StateMachineDetector

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/state-machine-detector.ts

State Machine Detector

Methods

MethodSignatureReturns
detectdetect(entities: Entity[])DetectedStateMachine[]
linkTransitionslinkTransitions(stateMachines: DetectedStateMachine[], entities: Entity[])void

Where it refuses work

  • StateMachineDetector stops the work with an early return when !isStatusEnum.
  • StateMachineDetector stops the work with an early return when states.length < 2.
  • StateMachineDetector stops the work with an early return when !code.includes('createMachine') && !code.includes('Machine(').
  • StateMachineDetector stops the work with an early return when states.length === 0.
  • StateMachineDetector stops the work with an early return when funcMatch.
  • StateMachineDetector stops the work with an early return when arrowMatch.

Was this page helpful?

Download as PDF