Socket
Book a DemoInstallSign in
Socket

@csod-oss/react-props-to-docs-ts

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@csod-oss/react-props-to-docs-ts

`npm install @csod-oss/react-props-to-docs-ts --save-dev`

latest
npmnpm
Version
0.0.12
Version published
Maintainers
2
Created
Source

react-props-to-docs-ts

npm install @csod-oss/react-props-to-docs-ts --save-dev

Parse out documentation from the typescript interface that defines a React component's props.


import { propsParser } from '@csod-oss/react-props-to-docs-ts';
const docs = docsParser($packageName, component);

  • Find declaration file (*.d.ts) based on component name
    • accept declaration filename paramater in options
    • use require.resolve to locate declaration
  • Parse file and search for Component to retreive the documenting interface from its jsdoc comment
  • Search for interface, retreive properties and corresponding typings with jsdocs

FAQs

Package last updated on 26 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts