You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

typescript-parser-deluxe

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-parser-deluxe

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


Version published
Maintainers
1
Created

Readme

Source

node typescript parser

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

Build Status Build Status Windows npm codecov semantic-release Greenkeeper badge Gitter

How to use

After you install the package via:

NPM

View Source Docs

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');

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 resolved exports and declarations.

Keep in mind, that the index'll only contain exported declarations.

Changelog

The changelog is generated by semantic release and is located under the release section.

Licence

This software is licenced under the MIT licence.

Keywords

FAQs

Package last updated on 04 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc