- Notifications
You must be signed in to change notification settings - Fork44
Parser for typescript (and javascript) files, that compiles those files and generates a human understandable AST.
License
buehler/node-typescript-parser
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This package is a TypeScript and ECMAScript parser. It uses the underlying typescript parser to generatea more or less human readable AST out of .js or .ts files.
After you install the package via:
You can use the parser with:
constparser=newTypescriptParser();// either:constparsed=awaitparser.parseSource(/* typescript source code as string */);// or a filepathconstparsed=awaitparser.parseFile('/user/myfile.ts','workspace root');
You can also parse multiple files at ones.
To use the declaration index (which is basically a list of symbols for your files)instantiate an index first and throw him some files.
After the parsing is done, you'll get an index with resolvedexports and declarations.
Keep in mind, that the index'll only contain exported declarations.
The changelog is generated bysemantic release and is located under therelease section.
This software is licenced under theMIT licence.
About
Parser for typescript (and javascript) files, that compiles those files and generates a human understandable AST.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors11
Uh oh!
There was an error while loading.Please reload this page.