Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 693 Bytes

Readme.md

File metadata and controls

34 lines (25 loc) · 693 Bytes

EN | 简体中文

Gain information ( such as type or comment ) of some type from typescript project.

Install

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

Usage

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

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

const { name, type, comment } = Props
// gain mutiple type information
const { getTypeOption } = require('@findlay-best-wishes/easy-type')

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