Abstract Syntax Tree (AST) Types and Builders

JSON →
library 0.14.2 ·javascript
verified May 27, 2026

ast-types is a foundational JavaScript library that provides an Esprima-compatible implementation of the Mozilla JavaScript Parser API, specifically designed for working with Abstract Syntax Trees (ASTs). It offers a robust and modular type hierarchy for representing JavaScript code as a tree structure, enabling efficient analysis, transformation, and code generation. The current stable version is `0.14.2`. While widely adopted as a dependency in many JavaScript tooling projects (e.g., Recast, Babel), it maintains a very slow release cadence, suggesting a mature and largely feature-complete state. Key differentiators include its `namedTypes` object for type-safe AST node inspection, `builders` for programmatic AST construction, and a powerful `visit` abstraction for tree traversal and modification. It provides a low-level, high-performance API for direct AST manipulation, often used in transpilers, linters, and code formatters.

total hits 22
actors 10 distinct systems
last hit 1d ago Amazonbot
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Amazonbot
1
ClaudeBot
1
ChatGPT-User
1
Search engines
1

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France