Skip to content

A tool that could gain information of some type from exist declaration file.

Notifications You must be signed in to change notification settings

findlay-best-wishes/easy-type

Repository files navigation

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

About

A tool that could gain information of some type from exist declaration file.

Resources

Stars

Watchers

Forks

Packages

No packages published