🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@tokland/ts-file-parser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokland/ts-file-parser

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

latest
Source
npmnpm
Version
0.0.23
Version published
Maintainers
1
Created
Source

TypeScript File Parser

Parse ts files and convert them to JSON objects.

Usage

import tsFileStruct from "ts-file-parser";

const filePath = "./src/typescript-file.ts";
const decls = fs.readFileSync(filePath).toString();
const jsonStructure = tsFileStruct.parseStruct(decls, {}, filePath);

Keywords

typescript

FAQs

Package last updated on 29 Aug 2021

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