# @uber-web-ui/extract-react-types

> Parse prop-types from react components using typescript or flow

Latest version **1.0.1** (published 2019-05-23) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @uber-web-ui/extract-react-types
pnpm add @uber-web-ui/extract-react-types
yarn add @uber-web-ui/extract-react-types
bun add @uber-web-ui/extract-react-types
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-05-23 |
| First published | 2019-01-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 18 |
| Unpacked size | 147 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | James Kyle |
| Maintainers | chasestarr, gergelyke, miksu, nadiia |
| Keywords | react, flow, typescript, prop-types, documentation |

## Links

- npm: https://www.npmjs.com/package/@uber-web-ui/extract-react-types
- Repository: https://github.com/uber-web/extract-react-types
- Homepage: https://github.com/uber-web/extract-react-types#readme
- Issues: https://github.com/uber-web/extract-react-types/issues
- npm.io page: https://npm.io/package/@uber-web-ui/extract-react-types

## Dependencies (18)

- [babylon](https://npm.io/package/babylon.md) ^7.0.0-beta.22
- [resolve](https://npm.io/package/resolve.md) ^1.10.1
- [babel-file](https://npm.io/package/babel-file.md) ^3.0.0
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.4.4
- [@babel/types](https://npm.io/package/@babel/types.md) ^7.0.0-beta.56
- [babel-errors](https://npm.io/package/babel-errors.md) ^1.1.1
- [strip-indent](https://npm.io/package/strip-indent.md) ^2.0.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.4.4
- [babylon-options](https://npm.io/package/babylon-options.md) ^2.0.1
- [ast-pretty-print](https://npm.io/package/ast-pretty-print.md) ^2.0.1
- [babel-file-loader](https://npm.io/package/babel-file-loader.md) ^2.0.0
- [babel-identifiers](https://npm.io/package/babel-identifiers.md) ^1.1.2
- [babel-type-scopes](https://npm.io/package/babel-type-scopes.md) ^1.1.0
- [babel-explode-module](https://npm.io/package/babel-explode-module.md) ^3.0.0
- [babel-flow-identifiers](https://npm.io/package/babel-flow-identifiers.md) ^1.1.3
- [babel-react-components](https://npm.io/package/babel-react-components.md) ^1.1.0
- [babel-normalize-comments](https://npm.io/package/babel-normalize-comments.md) ^1.0.1
- [babel-helper-simplify-module](https://npm.io/package/babel-helper-simplify-module.md) ^2.2.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-05-23
- 1.0.0 — 2019-01-18

## README

# extract-react-types

> Extract Flow & TypeScript types from React Components

## Features

- Supports flow and typescript
- Extracts the description of the props too ( Great for documentation )

## Usage

```sh
$ yarn add extract-react-types
```

```js
// Component.js

class Component extends React.Component<{ foo: boolean }> {}
```

Output:

```js
{
  "kind": "program",
  "classes": [
    {
      "kind": "object",
      "members": [
      {
        "kind": "property",
        "key": {
        "kind": "id",
        "name": "foo"
        },
        "value": {
        "kind": "boolean"
        },
        "optional": false
      }
      ],
      "name": {
      "kind": "id",
      "name": "Component",
      "type": null
      }
    }
  ]
}
```

## Related projects:

- [pretty-proptypes](https://github.com/atlassian/extract-react-types/tree/master/packages/pretty-proptypes)
- [babel-plugin-extract-react-types](https://github.com/atlassian/extract-react-types/tree/master/packages/babel-plugin-extract-react-types)
- [extract-react-types-loader](https://github.com/atlassian/extract-react-types/tree/master/packages/extract-react-types-loader)

---
_Source: https://npm.io/package/@uber-web-ui/extract-react-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
