Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 710 Bytes

Readme.zh.md

File metadata and controls

34 lines (25 loc) · 710 Bytes

简体中文 | EN

获取 typescript 工程中某个类型的信息,比如类型的字符表示及对应的 jsdoc comment。

安装

npm install @findlay-best-wishes/easy-type

用法

const { getTypeOption } = require('@findlay-best-wishes/easy-type')

const { Props } = getTypeOption({
  entryFile: 'test.ts',
  typeName: 'Props'
  tsconfig: 'tsconfig'
})

const { name, type, comment } = Props
// 获取多个类型信息
const { getTypeOption } = require('@findlay-best-wishes/easy-type')

const { Props, State } = getTypeOption({
  entryFile: 'button.ts',
  typeName: ['Props', 'State']
  tsconfig: 'tsconfig'
})