/** * Pass #48: sync-io-async (CWE-1050, category: performance) * * Detects synchronous (blocking) I/O calls made inside async functions in * JavaScript/TypeScript. Blocking calls stall the Node.js event loop, * negating the benefits of async/await and starving other concurrent work. * * Detection strategy: * 1. Collect async method line ranges from types[].methods where * modifiers include 'async'. * 2. For each call site within an async range, check if the method name * ends in 'Sync' (Node.js blocking variants) or is in the curated * BLOCKING_METHODS set. */ import type { AnalysisPass, PassContext } from '../../graph/analysis-pass.js'; export interface SyncIoAsyncResult { /** Blocking calls found inside async functions. */ blockingInAsyncFns: Array<{ line: number; method: string; enclosingMethod: string; }>; } export declare class SyncIoAsyncPass implements AnalysisPass { readonly name = "sync-io-async"; readonly category: "performance"; run(ctx: PassContext): SyncIoAsyncResult; } //# sourceMappingURL=sync-io-async-pass.d.ts.map