Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Parser for typescript (and javascript) files, that compiles those files and generates a human understandable AST.

License

NotificationsYou must be signed in to change notification settings

buehler/node-typescript-parser

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.

Build StatusBuild Status Windowsnpmcodecovsemantic-releaseGreenkeeper badgeGitter

How to use

After you install the package via:

NPM

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.

Changelog

The changelog is generated bysemantic release and is located under therelease section.

Licence

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

Stars

Watchers

Forks

Packages

No packages published

Contributors11


[8]ページ先頭

©2009-2025 Movatter.jp