Gain information ( such as type or comment ) of some type from typescript project.
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
// gain mutiple type information
const { getTypeOption } = require('@findlay-best-wishes/easy-type')
const { Props, State } = getTypeOption({
entryFile: 'button.ts',
typeName: ['Props', 'State']
tsconfig: 'tsconfig'
})