Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Structural Parser for Typescript files, provides JSON object with a declarations structures

License

Notifications You must be signed in to change notification settings

mulesoft-labs/ts-structure-parser

Repository files navigation

TypeScript Structural Parser

Build Status

This repository provides a parser for *.ts files. It parses the structure of a file and provides JSON object that contains its declaration.

Installation

npm install ts-structure-parser --save

Usage

import tsstruct=require("ts-structure-parser")

var filePath=path.resolve(path.resolve(__dirname,"src/"),"typescript-file.ts");
var decls=fs.readFileSync(filePath).toString();
var jsonStructure=tsstruct.parseStruct(decls,{},filePath);

About

Structural Parser for Typescript files, provides JSON object with a declarations structures

Resources

License

Stars

Watchers

Forks

Packages

No packages published