# @structured-types/prop-types-plugin

> react prop-types plugin for structured-types

Latest version **3.46.12** (published 2022-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @structured-types/prop-types-plugin
pnpm add @structured-types/prop-types-plugin
yarn add @structured-types/prop-types-plugin
bun add @structured-types/prop-types-plugin
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.46.12 |
| Published | 2022-07-16 |
| First published | 2021-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 197.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 60 |
| Author | Atanas Stoyanov |
| Maintainers | atanasster |
| Keywords | structured-types, react |

## Links

- npm: https://www.npmjs.com/package/@structured-types/prop-types-plugin
- Repository: https://github.com/ccontrols/structured-types
- Issues: https://github.com/ccontrols/structured-types/issues
- npm.io page: https://npm.io/package/@structured-types/prop-types-plugin

## Dependencies (1)

- [@structured-types/react-plugin](https://npm.io/package/@structured-types/react-plugin.md) ^3.46.12

## 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

- 3.46.12 (latest) — 2022-07-16
- 3.46.11 — 2022-05-27
- 3.46.9 — 2022-05-11
- 3.46.8 — 2022-04-29
- 3.46.7 — 2022-03-17
- 3.46.6 — 2022-02-22
- 3.46.5 — 2022-02-22
- 3.46.4 — 2022-02-20
- 3.46.3 — 2022-02-18
- 3.46.2 — 2022-02-18
- 3.46.1 — 2022-02-18
- 3.46.0 — 2022-02-17
- 3.45.0 — 2022-01-30
- 3.44.3 — 2022-01-24
- 3.44.2 — 2022-01-24
- … 64 more at https://npm.io/package/@structured-types/prop-types-plugin/versions

## README

# Table of contents

-   [Overview](#overview)
-   [Getting started](#getting-started)
    -   -   [1. Installation](#1-installation)
        -   [2. Your API source file (Component.tsx):](#2-your-api-source-file-componenttsx)
        -   [3. Your documentation extraction](#3-your-documentation-extraction)
        -   [4. The result](#4-the-result)
-   [Configuration](#configuration)
    -   [Enable the `children` props.](#enable-the-children-props)
    -   [ParsePlugin](#parseplugin)

# Overview

[structured-types](https://github.com/ccontrols/structured-types) plugin to extract react prop-types specific properties. If you are using typescript props for your react components, please see the [react](https://github.com/ccontrols/structured-types/tree/master/plugins/react) plugin.

# Getting started

### 1. Installation

```bash
$ npm install @structured-types/prop-types-plugin --save-dev
```

### 2. Your API source file (Component.tsx):

```js
import React from 'react';
import PropTypes from 'prop-types';

/**
 * MyComponent special component
 */
export const MyComponent = ({ stringProp }) => <div>{stringProp}</div>;

MyComponent.propTypes = {
  /** stringProp description */
  stringProp: PropTypes.string,
  /** numberProp description */
  numberProp: PropTypes.number.isRequired,
};

MyComponent.defaultProps = {
  stringProp: 'test',
};
```

### 3. Your documentation extraction

```ts
import { parseFiles } from '@structured-types/api';
import propTypesPlugin from '@structured-types/prop-types-plugin';
//optional you can also use react plugin for any typescript react props
import reactPlugin from '@structured-types/react-plugin';

const docs = parseFiles(['../src/components/Component.tsx'], {
  plugins: [propTypesPlugin, reactPlugin],
});
```

### 4. The result

```json
{
  "MyComponent": {
    "kind": 11,
    "extension": "react-prop-types",
    "properties": [
      {
        "name": "stringProp",
        "kind": 1,
        "optional": true,
        "description": "stringProp description",
        "value": "test"
      },
      {
        "name": "numberProp",
        "kind": 2,
        "description": "numberProp description"
      }
    ],
    "description": "MyComponent special component",
    "name": "MyComponent"
  }
}
```

# Configuration

The `react-prop-types` typescript uses the default configurations from the [react plugin](https://github.com/ccontrols/structured-types/tree/master/plugins/react), and you can also add or modify some of the other parsing options that will be specific only for the found react components. For other typescript/jsdoc types, the global options passed to parseFiles will still apply.

## Enable the `children` props.

By default, the plugin removes the `children` property that is part of most react components, here is an example of how to re-enable the `children` properties by disabling the default filter:

    import { parseFiles } from '@structured-types/api';
    import propTypesPlugin from '@structured-types/prop-types-plugin';

    const docs = parseFiles(['../src/components/Component.tsx'], {
      plugins: [{ ...propTypesPlugin, filter: undefined }],
    });

<api-readme files="../../packages/api/src/ts-utils.ts" extract="ParsePlugin"/>

<!-- START-API-README -->

## ParsePlugin

**`type`**

Plugin type - provides the plugin name and the type resolver

_defined in [@structured-types/api/packages/api/src/ts-utils.ts](https://github.com/ccontrols/structured-types/tree/master/packages/api/src/ts-utils.ts#L318)_

**properties**

| Name                     | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Parent         | Default | Description                                                                                                                                                                                  |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tsOptions`              | ts.CompilerOptions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | `DocsOptions`  |         |                                                                                                                                                                                              |
| `internalTypes`          | `Record`&lt;`string`, `PropKind`>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | `ParseOptions` |         | internal types - libs by default includes classes such as  `String` ,  `Function` ...                                                                                                        |
| `extract`                | `string`\[]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `ParseOptions` |         | list of export names to be extracted. by default all exports are extracted                                                                                                                   |
| `filter`                 | **function** (<br /><details><summary>`prop`\*</summary><blockquote>`kind`: <br />`name`: `string`<br />`alias`: `string`<br /><details><summary>`parent`</summary><blockquote>`name`\*: `string`<br />`loc`: SourceLocation</blockquote></details><details><summary>`loc`</summary><blockquote>`filePath`: `string`<br />`loc`: SourcePositions</blockquote></details>`optional`: `boolean`<br />`readonly`: `boolean`<br />`abstract`: `boolean`<br />`async`: `boolean`<br />`visibility`: `"private"` \| `"protected"` \| `"public"`<br />`static`: `boolean`<br />`type`: `string`<br />`extension`: `string`<br />`description`: `string`<br />`fires`: `string`\[]<br />`see`: `string`\[]<br />`examples`: `JSDocExample`\[]<br />`tags`: `JSDocPropTag`\[]<br />`summary`: `string`<br />`deprecated`: `string` \| `true`<br />`ignore`: `boolean`<br />`usage`: `type`\[]</blockquote></details>) => `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | `ParseOptions` |         | filter properties function. By default filter out all props with ignore === true                                                                                                             |
| `maxDepth`               | `number`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | `ParseOptions` | `6`     | max depth for extracting child props.                                                                                                                                                        |
| `collectHelpers`         | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `ParseOptions` |         | whether to save "helper" props that are used by the main parsed props if set to false will result in a smaller result set                                                                    |
| `collectGenerics`        | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `ParseOptions` | `true`  | whether to collect generics parameters                                                                                                                                                       |
| `collectParameters`      | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `ParseOptions` | `true`  | whether to collect function parameters                                                                                                                                                       |
| `collectParametersUsage` | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `ParseOptions` |         | whether to collect function parameters usage locations within the function body                                                                                                              |
| `collectProperties`      | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `ParseOptions` | `true`  | whether to collect object/type properties                                                                                                                                                    |
| `collectInheritance`     | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `ParseOptions` | `true`  | whether to collect the inheritance properties                                                                                                                                                |
| `collectExtension`       | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `ParseOptions` | `true`  | whether to collect the plugin/extension name                                                                                                                                                 |
| `collectDiagnostics`     | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `ParseOptions` |         | whether to collect errors/diagnostics                                                                                                                                                        |
| `collectAliasName`       | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `ParseOptions` | `true`  | whether to collect alias names - for example: when imported default symbol from another file, this will be the import name                                                                   |
| `collectInternals`       | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `ParseOptions` |         | whether to collect internal (typescript) symbols                                                                                                                                             |
| `plugins`                | [`ParsePlugin`](#parseplugin)\[]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | `ParseOptions` |         | installed plugins can modify default options and install type resolvers                                                                                                                      |
| `scope`                  | `"exports"` \| `"all"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `ParseOptions` |         | by default collects only the exported symbols                                                                                                                                                |
| `collectSourceInfo`      | `boolean` \| `"body"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `ParseOptions` |         | whether to collect the file path and the source code location for the symbol declarations. If set to 'body', the source will refer to the function body instead of the variable declaration. |
| `collectInnerLocations`  | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `ParseOptions` |         | whether to collect the source code location for inner symbol declarations if set to true, the data will be collected in the  `loc`  prop                                                     |
| `moduleCallback`         | **function** (<br />`module`\*: Symbol<br />`checker`\*: TypeChecker<br />) => `void`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `ParseOptions` |         | callback with the parsed module. Can be used to retrieve additional information such as the imports of a file etc.                                                                           |
| `typesResolve*`          | **function** (<br /><details><summary>`props`\*</summary><blockquote>`symbolType`\*: Type<br />`declaration`: ts.Declaration<br /><details><summary>`parser`\*</summary><blockquote>`checker`\*: TypeChecker<br /><details><summary>`options`\*</summary><blockquote>`internalTypes`: `Record`&lt;`string`, `PropKind`><br />`extract`: `string`\[]<br />`filter`: **function** (<br />`prop`\*: <br />) => `boolean`<br />`isInternal`: **function** (<br />`file`\*: <br />`node`\*: <br />) => `boolean` \| `undefined`<br />`maxDepth`: `number`<br />`collectHelpers`: `boolean`<br />`collectGenerics`: `boolean`<br />`collectParameters`: `boolean`<br />`collectParametersUsage`: `boolean`<br />`collectProperties`: `boolean`<br />`collectInheritance`: `boolean`<br />`collectExtension`: `boolean`<br />`collectDiagnostics`: `boolean`<br />`collectAliasName`: `boolean`<br />`collectInternals`: `boolean`<br />`plugins`: [`ParsePlugin`](#parseplugin)\[]<br />`scope`: `"exports"` \| `"all"`<br />`collectSourceInfo`: `boolean` \| `"body"`<br />`collectInnerLocations`: `boolean`<br />`moduleCallback`: **function** (<br />`module`\*: <br />`checker`\*: <br />) => `void`</blockquote></details>`parseProperties`\*: **function** (<br /><details><summary>`properties`\*</summary><blockquote>\[`number`]: `T`</blockquote></details><details><summary>`options`\*</summary><blockquote>`internalTypes`\*: <br />`extract`\*: <br />`filter`\*: <br />`isInternal`\*: <br />`maxDepth`\*: <br />`collectHelpers`\*: <br />`collectGenerics`\*: <br />`collectParameters`\*: <br />`collectParametersUsage`\*: <br />`collectProperties`\*: <br />`collectInheritance`\*: <br />`collectExtension`\*: <br />`collectDiagnostics`\*: <br />`collectAliasName`\*: <br />`collectInternals`\*: <br />`plugins`\*: <br />`scope`\*: <br />`collectSourceInfo`\*: <br />`collectInnerLocations`\*: <br />`moduleCallback`\*: </blockquote></details>`types`: `PropType`\[]<br />) => `PropType`\[]<br />`updateSymbolName`\*: **function** (<br /><details><summary>`prop`\*</summary><blockquote>`kind`\*: <br />`name`\*: <br />`alias`\*: <br />`parent`\*: <br />`loc`\*: <br />`optional`\*: <br />`readonly`\*: <br />`abstract`\*: <br />`async`\*: <br />`visibility`\*: <br />`static`\*: <br />`type`\*: <br />`extension`\*: <br />`description`\*: <br />`fires`\*: <br />`see`\*: <br />`examples`\*: <br />`tags`\*: <br />`summary`\*: <br />`deprecated`\*: <br />`ignore`\*: <br />`usage`\*: </blockquote></details>`node`: ts.Declaration<br />) => <details><summary>`PropType`</summary><blockquote>`kind`\*: <br />`name`\*: <br />`alias`\*: <br />`parent`\*: <br />`loc`\*: <br />`optional`\*: <br />`readonly`\*: <br />`abstract`\*: <br />`async`\*: <br />`visibility`\*: <br />`static`\*: <br />`type`\*: <br />`extension`\*: <br />`description`\*: <br />`fires`\*: <br />`see`\*: <br />`examples`\*: <br />`tags`\*: <br />`summary`\*: <br />`deprecated`\*: <br />`ignore`\*: <br />`usage`\*: </blockquote></details><br />`parseType`\*: **function** (<br /><details><summary>`prop`\*</summary><blockquote>`kind`\*: <br />`name`\*: <br />`alias`\*: <br />`parent`\*: <br />`loc`\*: <br />`optional`\*: <br />`readonly`\*: <br />`abstract`\*: <br />`async`\*: <br />`visibility`\*: <br />`static`\*: <br />`type`\*: <br />`extension`\*: <br />`description`\*: <br />`fires`\*: <br />`see`\*: <br />`examples`\*: <br />`tags`\*: <br />`summary`\*: <br />`deprecated`\*: <br />`ignore`\*: <br />`usage`\*: </blockquote></details><details><summary>`options`\*</summary><blockquote>`internalTypes`\*: <br />`extract`\*: <br />`filter`\*: <br />`isInternal`\*: <br />`maxDepth`\*: <br />`collectHelpers`\*: <br />`collectGenerics`\*: <br />`collectParameters`\*: <br />`collectParametersUsage`\*: <br />`collectProperties`\*: <br />`collectInheritance`\*: <br />`collectExtension`\*: <br />`collectDiagnostics`\*: <br />`collectAliasName`\*: <br />`collectInternals`\*: <br />`plugins`\*: <br />`scope`\*: <br />`collectSourceInfo`\*: <br />`collectInnerLocations`\*: <br />`moduleCallback`\*: </blockquote></details>`node`: ts.Node<br />) => <details><summary>`PropType`</summary><blockquote>`kind`\*: <br />`name`\*: <br />`alias`\*: <br />`parent`\*: <br />`loc`\*: <br />`optional`\*: <br />`readonly`\*: <br />`abstract`\*: <br />`async`\*: <br />`visibility`\*: <br />`static`\*: <br />`type`\*: <br />`extension`\*: <br />`description`\*: <br />`fires`\*: <br />`see`\*: <br />`examples`\*: <br />`tags`\*: <br />`summary`\*: <br />`deprecated`\*: <br />`ignore`\*: <br />`usage`\*: </blockquote></details><br />`parseTypeValueComments`\*: **function** (<br /><details><summary>`prop`\*</summary><blockquote>`kind`\*: <br />`name`\*: <br />`alias`\*: <br />`parent`\*: <br />`loc`\*: <br />`optional`\*: <br />`readonly`\*: <br />`abstract`\*: <br />`async`\*: <br />`visibility`\*: <br />`static`\*: <br />`type`\*: <br />`extension`\*: <br />`description`\*: <br />`fires`\*: <br />`see`\*: <br />`examples`\*: <br />`tags`\*: <br />`summary`\*: <br />`deprecated`\*: <br />`ignore`\*: <br />`usage`\*: </blockquote></details><details><summary>`options`\*</summary><blockquote>`internalTypes`\*: <br />`extract`\*: <br />`filter`\*: <br />`isInternal`\*: <br />`maxDepth`\*: <br />`collectHelpers`\*: <br />`collectGenerics`\*: <br />`collectParameters`\*: <br />`collectParametersUsage`\*: <br />`collectProperties`\*: <br />`collectInheritance`\*: <br />`collectExtension`\*: <br />`collectDiagnostics`\*: <br />`collectAliasName`\*: <br />`collectInternals`\*: <br />`plugins`\*: <br />`scope`\*: <br />`collectSourceInfo`\*: <br />`collectInnerLocations`\*: <br />`moduleCallback`\*: </blockquote></details>`declaration`: ts.Node<br />`initializer`: ts.Node<br />) => `PropType` \| `null`<br />`parseSymbol`\*: **function** (<br />`symbol`\*: Symbol<br /><details><summary>`options`\*</summary><blockquote>`internalTypes`\*: <br />`extract`\*: <br />`filter`\*: <br />`isInternal`\*: <br />`maxDepth`\*: <br />`collectHelpers`\*: <br />`collectGenerics`\*: <br />`collectParameters`\*: <br />`collectParametersUsage`\*: <br />`collectProperties`\*: <br />`collectInheritance`\*: <br />`collectExtension`\*: <br />`collectDiagnostics`\*: <br />`collectAliasName`\*: <br />`collectInternals`\*: <br />`plugins`\*: <br />`scope`\*: <br />`collectSourceInfo`\*: <br />`collectInnerLocations`\*: <br />`moduleCallback`\*: </blockquote></details>) => `PropType` \| `undefined`</blockquote></details>`expression`: ts.Expression</blockquote></details>) => `ResolverReturnType` \| `undefined` |                |         | type resolving custom function ie from a react component will return the props type if the plugin does not recognize the type, should return undefined                                       |
| `pluginName`             | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |                |         | plugin name                                                                                                                                                                                  |

<!-- END-API-README -->

---
_Source: https://npm.io/package/@structured-types/prop-types-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
