Analyzer Showcase
This page shows what the analyzer produces for each workflow pattern: the source code (from real fixture files) and the generated Mermaid diagram. Step-level details (types, errors, retry/timeout) are extracted when the type checker is available.
Linear steps
Result:
Promise<{ user: User; orders: Order[]; }>Errors:NOT_FOUNDFETCH_ERRORSEND_ERROR3 steps analyzed
getUserdeps.fetchUserdep: fetchUserNOT_FOUND→ Usererr: "NOT_FOUND"
getOrdersdeps.fetchOrdersdep: fetchOrdersFETCH_ERROR→ Order[]err: "FETCH_ERROR"
notifydeps.sendEmaildep: sendEmailSEND_ERRORerr: "SEND_ERROR"
step.sleep
Result:
Promise<string>2 steps analyzed
pausestep.sleepsleep
longPausestep.sleepsleep
step.retry
Result:
Promise<any>Errors:NETWORK_ERROR1 step analyzed
fetchstep.retrydep: fetchDataretryretry: 3 exponential
step.withTimeout
Result:
Promise<any>Errors:TIMEOUT1 step analyzed
slowCallstep.withTimeoutdep: slowOpwithTimeouttimeout: 5000ms
step.try & step.fromResult
Result:
Promise<any>Errors:RISKY_ERRORFETCH_ERROR2 steps analyzed
attemptstep.trydep: riskyOptry
loadstep.fromResultdep: fetchResultfromResult
step.withFallback
Result:
Promise<any>Errors:NOT_FOUNDnever1 step analyzed
fetchWithFallbackstep.withFallbackdep: fetchPrimary
step.withResource
Result:
Promise<any>Errors:ACQUIRE_ERRORUSE_ERROR1 step analyzed
useConnstep.withResourcewithResourcedeps.acquire → deps.useResource → inline
step.dep
Result:
Promise<any>Errors:NOT_FOUND1 step analyzed
getUserdeps.fetchUserdep: userService→ { id: string; }err: "NOT_FOUND"
step.race
Result:
Promise<any>Errors:MISS2 steps analyzed
race.cacheA.cacheAdeps.cacheAdep: cacheA→ stringerr: "MISS"
race.cacheB.cacheBdeps.cacheBdep: cacheB→ stringerr: "MISS"
when / unless / whenOr / unlessOr
Result:
Promise<ConditionalResult>Errors:AUDIT_FAILEDCOMPUTE_ERROR4 steps analyzed
whenStepdeps.auditdep: audit→ booleanerr: "AUDIT_FAILED"
unlessStepdeps.computedep: compute→ numbererr: "COMPUTE_ERROR"
whenOrStepdeps.auditdep: audit→ booleanerr: "AUDIT_FAILED"
unlessOrStepdeps.computedep: compute→ numbererr: "COMPUTE_ERROR"
switch
Result:
Promise<string>Errors:ADMIN_ERRORUSER_ERRORnever3 steps analyzed
admindeps.adminActiondep: adminActionADMIN_ERRORerr: "ADMIN_ERROR"
userdeps.userActiondep: userActionUSER_ERRORerr: "USER_ERROR"
defaultdeps.defaultActiondep: defaultAction
for / while / for-of / for-in
Result:
Promise<string>Errors:PROCESS_ERROR4 steps analyzed
forStepdeps.processItemdep: processItemPROCESS_ERRORloop: forerr: "PROCESS_ERROR"
forOfStepdeps.processItemdep: processItemPROCESS_ERRORloop: itemserr: "PROCESS_ERROR"
forInStepdeps.processItemdep: processItemPROCESS_ERRORloop: objerr: "PROCESS_ERROR"
whileStepdeps.processItemdep: processItemPROCESS_ERRORloop: whileerr: "PROCESS_ERROR"
Workflow ref
Result:
Promise<{ user: User; enriched: Enriched; }>Errors:NOT_FOUND1 step analyzed
getUserdeps.fetchUserdep: fetchUserNOT_FOUND→ Usererr: "NOT_FOUND"
Complex (parallel + conditional + forEach)
Result:
Promise<ComplexResult>Errors:ERR4 steps analyzed
parallel.fetchBoth.fetchAdeps.fetchAdep: fetchA→ stringerr: "ERR"
parallel.fetchBoth.fetchBdeps.fetchBdep: fetchB→ stringerr: "ERR"
forEach.processAll.processItemdeps.processItemdep: processItemloop: items→ stringerr: "ERR"
fetchAOnlydeps.fetchAdep: fetchAERR→ stringerr: "ERR"
Saga workflow
Result:
Promise<{ reservation: { reservationId: string; }; payment: { chargeId: string; }; }>Errors:UNAVAILABLERELEASE_FAILEDCHARGE_FAILEDNOTIFY_FAILED3 steps analyzed
Reservedeps.reservedep: reservecompensable
Chargedeps.chargedep: chargecompensable
Notifydeps.notifydep: notifytry
See Static Analysis for the full API and Visualization for runtime diagrams.