JSDoc Type Pratt Parser
JSON →jsdoc-type-pratt-parser is a robust library designed for parsing JSDoc type expressions into an Abstract Syntax Tree (AST). It offers support for three distinct grammars: 'jsdoc', 'closure', and 'typescript', allowing it to handle a wide range of type syntaxes. Unlike older parsing solutions such as `catharsis` or `jsdoctypeparser` that might rely on tools like PEG.js, this library is built as a Pratt parser, which is a powerful and flexible approach for handling operator precedence in expressions. The package is actively maintained, with frequent releases (e.g., v7.2.0 released in April 2026), and ships with full TypeScript type definitions. Beyond parsing, it provides utilities for transforming and stringifying ASTs, enabling developers to customize the output based on specific requirements, making it a versatile tool for any project dealing with JSDoc type analysis or manipulation. Its key differentiators include its Pratt parser architecture, explicit grammar support, and comprehensive TypeScript integration.
Traffic · last 30 days ↑150% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany