0.1.4 • Published 2 years ago

@iviva/react-tsdoc v0.1.4

Weekly downloads
19
License
ISC
Repository
github
Last release
2 years ago

React Typescript Document Generator

Documentation generator for React Components written in Typescript.

This exists to generate docs for your react components.

It extracts documentation from your components and their props.

Usage

Use tsdoc-style comments for your components:

/**

*/

Your components must either be classes that inherit from React.Component<P,S> or, if you're using new-style function components, then they should be declared as variables of type React.FunctionComponent<P>.

Examples:

interface ILabelProps {
    /**
    *  the label text to be set
    */
    value: string;
}

/**
* A simple component to render a static label
*/
const Label:React.Component<ILabelProps> = (props) =>  <span>{props.value}</span>;


/**
* A simple component to render a static label
*/
class Label2 extends React.Component<ILabelProps,{}> {
    render() {
        return <span>{this.props.value}</span>;
    }
}

Commands

react-tsdoc types <output.d.ts> --module-name

0.1.4

2 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.9

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago