npm.io
4.0.3 • Published 4 years ago

@component-controls/react-docgen-typescript-info

Licence
MIT
Version
4.0.3
Deps
2
Size
49 kB
Vulns
0
Weekly
0
Stars
82

Table of contents

Overview

Extract props info from react typescript components:

Installation

This package is usually installed as part of the @component-controls package, but you can also install it standalone to extract props info from react typescript components

$ npm install @component-controls/react-docgen-typescript-info --save-dev

API

run

function

run API to generate react-docgen-typescript props information tables.

defined in @component-controls/react-docgen-typescript-info/props-info/react-docgen-typescript/src/index.ts

parameters

Name Type Description
options
type
transformProps: function (
props*: ComponentDoc[]
) =>
ComponentDoc
expression: ts.Symbol
displayName*: string
filePath*: string
description*: string
props*
[string]: T
methods*: Method[]
tags
[string]: T

propFilter: StaticPropFilter | PropFilter
componentNameResolver: function (
exp*: Symbol
source*: SourceFile
) => string | undefined | null | false
shouldExtractLiteralValuesFromEnum: boolean
shouldRemoveUndefinedFromOptional: boolean
shouldExtractValuesFromUnion: boolean
skipChildrenPropWithoutDoc: boolean
savePropValueAsString: boolean
shouldIncludePropTagMap: boolean
shouldIncludeExpression: boolean
customComponentTypes: string[]
configuration options
returns PropsInfoExtractorFunction a callable function of type PropsInfoExtractorFunction