react-docgen
react-docgen copied to clipboard
A CLI and library to extract information from React component files for documentation generation purposes.
Supports doc generation for the following, pattern: ``` function MyHoc(v: React.Component) : React.Component { return v; } interface Props { ... } class MyComponent extends MyHoc(React.Component) { render() { return...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/typescript-eslint) ([source](https://togithub.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)) | [`6.21.0` -> `7.4.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/6.21.0/7.4.0) |...
[](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [node](https://nodejs.org) ([source](https://togithub.com/nodejs/node)) | minor | `20.11.1` -> `20.12.0` | --- ### Release Notes...
react-docgen seems to fail on this file: ```ts import { createSlice, type PayloadAction } from "@reduxjs/toolkit"; type State = { [id: number]: { bar: number } }; const initialState: State...
Hello there, In the following code, the `elements` of the `size` props are not outputted. ```tsx type Base = { size: "small" | "medium" | "large"; }; type Props =...
You can paste the code below in the [playground](https://react-docgen.dev/playground) and see that `description` and `tsType` are lost. ```ts interface Props { /** The name to greet */ name: string }...
Fixes #877 - [ ] Tests for Interfaces, because they might start working unexpectedly - [ ] Tests for enums - [ ] implement enums
The following code tested in the playgroud https://react-docgen.dev/playground ```typescript interface Props { /** * The name to greet * * @defaultValue 'something' */ name: string; } /** * Hello world...
**Background** In certain scenarios react-docgen tries to parse CSS modules. This yields an error as follows: > **Use case** See related Storybook issue https://github.com/storybookjs/storybook/issues/25662 and stackblitz reproduction https://stackblitz.com/edit/github-cwovgn-yvzreq Have a...
## Description Many Typescript libraries publish types in declaration files (.d.ts) alongside their associated .js bundles. In .d.ts files generated through TS compilation, function types are often defined using [declaration...