@findlay-best-wishes/easy-type
v1.0.1
Published
gain information of some type from typescript project
Downloads
8
Readme
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'
})