Skip to content

@kubb/parser-ts 🦙

This library contains the building blocks that can be used to create TypeScript code. It's all based on TypeScript AST(an API of the TypeScript team to create AST nodes).

A good tool to visualize what AST is can be found on TypeScript AST Viewer, here you can see what the AST code would be based on some TypeScript code.

To get started with TypeScript AST, I would suggest following this tutorial: Generating TypeScript using AST's.

This library contains also the logic to print the nodes(convert AST to string) and it also has the functionality to generate index.ts files based on a folder structure(see writeIndexes).


bun add @kubb/parser-ts
pnpm add @kubb/parser-ts
npm install @kubb/parser-ts
yarn add @kubb/parser-ts

Released under the MIT License.