Saber2pr / ts-compiler

Typescript Compiler Utils.

Home Page:https://saber2pr.top/ts-compiler/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@saber2pr/ts-compiler

npm codecov

ts compiler utils.

yarn add @saber2pr/ts-compiler

Usage

see document: https://saber2pr.top/ts-compiler/

import {
  readTsExport,
  readTsFileExport,
  traverser,
} from '@saber2pr/ts-compiler'

readTsFileExport('./test.ts').then(res => {
  // res is value exported from ./test.ts
  console.log(res)
  console.log(res.test)
})

const ast = traverser.createAstNode(`your code`)
traverser.findJsxElementByTagName(ast, 'View')
// traverser.findXXX

About

Typescript Compiler Utils.

https://saber2pr.top/ts-compiler/


Languages

Language:TypeScript 99.3%Language:JavaScript 0.5%Language:Shell 0.1%