Preparing for system design interviews?  Try bugzed.com →

Abstract Syntax Tree (AST) Types and Builders

JSON →
library 0.14.2 ·javascript
verified Jun 17, 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 19
actors 4 distinct systems
last hit 19d ago AhrefsBot
ByteDance
7
GPTBot
4
Script
1
Humans
3

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