parse-ts-to-ast
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

typescript parser

This package is a TypeScript parser. It uses the underlying typescript parser to generate a more or less human-readable AST out of .ts files.

How to use

After you install the package via:

npm i parse-ts-to-ast

You can use the parser with:

const parser = new TypescriptParser();

// either:
const parsed = await parser.parseSource(/* typescript source code as string */);

// or a filepath
const parsed = await parser.parseFile('/user/myfile.ts', 'workspace root');

Licence

This software is licenced under the MIT licence.

Readme

Keywords

Package Sidebar

Install

npm i parse-ts-to-ast

Weekly Downloads

1,192

Version

0.1.4

License

MIT

Unpacked Size

259 kB

Total Files

222

Last publish

Collaborators

  • ts-expector