Analyzer Showcase
Each example comes from a TypeScript fixture in the analyzer test suite. Switch between the diagram and its source. Runtime examples add a recorded-run tab over the same static graph. Open steps analyzed to inspect inferred output types, error unions, dependency policies, and step metadata.
Start with the examples that match the work in front of you:
| You need to inspect | Open this example |
|---|---|
| A short request handler | Linear steps |
| Retry and timeout policy declared on dependencies | run() with dependency policies |
| Branches, parallel work, and iteration in one graph | Complex (parallel + conditional + forEach) |
| Ownership, external calls, state changes, and error severity | Architecture and error metadata |
| Rollback order after a partial failure | Saga workflow |
| Where cancellation stopped work | Cancellation: recorded run |
| Which steps resumed from saved state | Persistence: resumed run |
| Rollback order and a failed undo | Saga rollback and compensation failure |
The analyzer generates the diagrams below from the source shown beside them. Recorded runs pass through the same trace overlay used by the CLI and live inspector. Edit a step id, branch, policy, or error type in the fixture and regenerate the data; the diagram and step facts change with the code.
Linear steps
Promise<{ user: User; orders: Order[]; }>Errors:NOT_FOUNDFETCH_ERRORSEND_ERROR3 steps analyzed
getUserdeps.fetchUsergetOrdersdeps.fetchOrdersnotifydeps.sendEmailstep.sleep
Promise<string>2 steps analyzed
pausestep.sleeplongPausestep.sleepstep.retry
Promise<{ data: string; }>Errors:NETWORK_ERROR1 step analyzed
fetchstep.retrystep.withTimeout
Promise<number>Errors:TIMEOUT1 step analyzed
slowCallstep.withTimeoutstep.try & step.fromResult
Promise<string>Errors:RISKY_ERRORFETCH_ERROR2 steps analyzed
attemptstep.tryloadstep.fromResultstep.withFallback
Promise<string>Errors:NOT_FOUNDnever1 step analyzed
fetchWithFallbackstep.withFallbackstep.withResource
Promise<string>Errors:ACQUIRE_ERRORUSE_ERROR1 step analyzed
useConnstep.withResourcestep.dep
Promise<{ id: string; }>Errors:NOT_FOUND1 step analyzed
getUserdeps.fetchUserstep.race
Promise<string>Errors:MISS2 steps analyzed
race.0.cacheAdeps.cacheArace.1.cacheBdeps.cacheBwhen / unless / whenOr / unlessOr
Promise<ConditionalResult>Errors:AUDIT_FAILEDCOMPUTE_ERROR4 steps analyzed
whenStepdeps.auditunlessStepdeps.computewhenOrStepdeps.auditunlessOrStepdeps.computeswitch
Promise<string>Errors:ADMIN_ERRORUSER_ERRORnever3 steps analyzed
admindeps.adminActionuserdeps.userActiondefaultdeps.defaultActionfor / while / for-of / for-in
Promise<string>Errors:PROCESS_ERROR4 steps analyzed
forStepdeps.processItemforOfStepdeps.processItemforInStepdeps.processItemwhileStepdeps.processItemWorkflow ref
Promise<{ user: User; enriched: Enriched; }>Errors:NOT_FOUND2 steps analyzed
getUserdeps.fetchUsercallChilddeps.enrichUserComplex (parallel + conditional + forEach)
Promise<ComplexResult>Errors:ERR4 steps analyzed
parallel.fetchBoth.fetchAdeps.fetchAparallel.fetchBoth.fetchBdeps.fetchBforEach.processAll.processItemdeps.processItemfetchAOnlydeps.fetchASaga workflow
Promise<{ reservation: { reservationId: string; }; payment: { chargeId: string; }; }>Errors:UNAVAILABLERELEASE_FAILEDCHARGE_FAILEDNOTIFY_FAILED3 steps analyzed
Reservedeps.reserveChargedeps.chargeNotifydeps.notifyrun() with dependency policies
Promise<{ user: User; orders: Order[]; }>Errors:USER_NOT_FOUNDORDERS_UNAVAILABLETimeoutError2 steps analyzed
getUsergetUsergetOrdersgetOrders- Policies:
- timeout(2_000) → retry({ attempts: 3, delay: 100, backoff: "exponential", })
Architecture and error metadata
Promise<Payment>Errors:PaymentError1 step analyzed
charge-carddeps.chargeCard- Intent:
- Collect payment before fulfillment starts
- Calls:
- payment-gateway
- State:
- order.paymentStatus -> PAID
- Emits:
- PaymentCaptured
- Errors:
- CARD_DECLINED · business · no retry; GATEWAY_TIMEOUT · infrastructure · retryable
Cancellation: recorded run
Promise<Profile>Errors:PROFILE_FAILEDEMAIL_FAILED2 steps analyzed
loadProfiledeps.loadProfilesendEmaildeps.sendEmailPersistence: resumed run
Promise<{ reservation: { id: string; }; payment: { id: string; }; }>Errors:OUT_OF_STOCKPAYMENT_FAILED2 steps analyzed
reserveStockdeps.reserveStockchargedeps.chargeSaga rollback and compensation failure
Promise<{ payment: { id: string; }; stock: { id: string; }; }>Errors:DECLINEDREFUND_FAILEDOUT_OF_STOCKRELEASE_FAILEDSHIPMENT_FAILED3 steps analyzed
chargedeps.chargereservedeps.reserveshipdeps.shipUse Static Analysis for CI, diffs, test matrices, and trace overlays. Visualization covers runtime event streams.