Sohu Tech Products
Aug 13, 2025 · Fundamentals
How to Track TypeScript API Usage with AST Analysis and Custom Loaders
This article explains how to replace inefficient global searches for third‑party APIs with a TypeScript‑based solution that parses source files into an AST, traverses import declarations, distinguishes import styles, records call counts and line numbers, and overcomes symbol resolution challenges using the TypeScript compiler API.
ASTTypeScriptcode analysis
0 likes · 14 min read
