0.1.4 • Published 1 year ago
parse-ts-to-ast v0.1.4
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.