New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

typescript-parser

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-parser - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

clonable/Clonable.d.ts

5

package.json
{
"name": "typescript-parser",
"version": "1.0.0",
"version": "1.0.1",
"description": "Parser for typescript (and javascript) files, that compiles those files and generates a human understandable AST.",

@@ -46,5 +46,6 @@ "main": "index.js",

"dependencies": {
"coveralls": "^2.13.1",
"tslib": "^1.7.1",
"typescript": "^2.4.1"
}
}
}
# 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](https://travis-ci.org/TypeScript-Heroes/node-typescript-parser.svg)](https://travis-ci.org/TypeScript-Heroes/node-typescript-parser)
[![npm](https://img.shields.io/npm/v/typescript-parser.svg?maxAge=3600)](https://www.npmjs.com/package/typescript-parser)
[![Coverage status](https://img.shields.io/coveralls/TypeScript-Heroes/node-typescript-parser.svg?maxAge=3600)](https://coveralls.io/github/TypeScript-Heroes/node-typescript-parser)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
## How to use
After you install the package via:
[![NPM](https://nodei.co/npm/typescript-parser.png?downloads=true&stars=true)](https://nodei.co/npm/typescript-parser/)
You can use the parser with:
```typescript
const parser = new TypescriptParser();
// either:
const parsed = await parser.parseSource(/* typescript source code as string */);
// or a filepath
const parsed = await parser.parseSource('/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](https://github.com/semantic-release/semantic-release) and is located under the
[release section](https://github.com/TypeScript-Heroes/node-typescript-parser/releases).
## Licence
This software is licenced under the [MIT](LICENSE) licence.
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc