1.0.1 • Published 3 years ago

@findlay-best-wishes/easy-type v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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'
})