TypeScript AST Wrapper and Code Manipulator
JSON →ts-morph (formerly ts-simple-ast) is a robust library that wraps the TypeScript Compiler API, offering a more user-friendly and programmatic way to navigate, analyze, and manipulate TypeScript and JavaScript code. It provides an in-memory file system where all changes are tracked until explicitly saved, allowing for complex refactoring and code generation tasks. The library maintains strong compatibility with recent TypeScript versions, often releasing new major versions shortly after a new TypeScript compiler release. The current stable version is 28.0.0, which supports TypeScript 6.0. Key differentiators include its extensive wrapper API, enabling easy traversal and modification of AST nodes, and its ability to fall back to the raw `compilerNode` when advanced compiler API access is needed, providing full flexibility for complex scenarios.
Traffic · last 30 days ↓71% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France