TypeScript Poet
JSON →ts-poet is a specialized code generation DSL (Domain Specific Language) for TypeScript, currently at version 6.12.0. It distinguishes itself by leveraging TypeScript's template literals to provide an intuitive, string-based approach to code generation, sidestepping the complexities of direct Abstract Syntax Tree (AST) manipulation. Its core strength lies in automatic import management, intelligently collecting and emitting necessary `import` statements, resolving symbol collisions, and simplifying conditional output. ts-poet also integrates `dprint-node` for fast and 'prettier-ish' code formatting, a significant differentiator from many generators that output unformatted or poorly formatted code. While inspired by JavaPoet's builder patterns in its earlier v1/v2 releases, the library has since evolved to a more streamlined, template-literal-centric API, making it highly adaptable for generating code from arbitrary schemas or user-defined inputs. The project maintains an active development status with consistent updates to support modern TypeScript features and ecosystem changes.
Traffic · last 30 days ↓87% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany