Skip to content

Commit

Permalink
feat: added docs for react-docgen
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Mar 26, 2020
1 parent ed8e089 commit 71d4629
Show file tree
Hide file tree
Showing 8 changed files with 356 additions and 609 deletions.
8 changes: 4 additions & 4 deletions core/specification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ _defined in [@component-controls/specification/src/test.ts](https://github.com/c

### properties

| Name | Type | Description |
| --------- | ------------------------------------------------- | ----------- |
| `lookup*` | (`name`\*: string): [Scope](#scope) \| undefined; | |
| `node*` | [NodePath](#nodepath) | |
| Name | Type | Description |
| --------- | -------------------------------------------------------------- | ----------- |
| `lookup*` | **function** (`name`\*: string): [Scope](#scope) \| undefined; | |
| `node*` | [NodePath](#nodepath) | |

## ParserPluginWithOptions

Expand Down
46 changes: 23 additions & 23 deletions props-info/react-docgen-typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ run API to generate react-docgen-typescript props information tables.

_defined in [@component-controls/react-docgen-typescript-info/src/index.ts](https://github.com/ccontrols/component-controls/tree/master/props-info/react-docgen-typescript/src/index.ts#L14)_

**run**(`options`: [RectDocgenTypescriptOptions](#rectdocgentypescriptoptions)): [PropsInfoExtractorFunction](#propsinfoextractorfunction);
**function** run(`options`: [RectDocgenTypescriptOptions](#rectdocgentypescriptoptions)): [PropsInfoExtractorFunction](#propsinfoextractorfunction);

### parameters

Expand All @@ -64,7 +64,7 @@ _defined in [@component-controls/react-docgen-typescript-info/src/types.ts](http

| Name | Type | Description |
| ---------------- | ------------------------------------------------------------------------------------------ | ------------------------------------- |
| `transformProps` | undefined \| (`props`\*: [ComponentDoc](#componentdoc)\[]): [ComponentDoc](#componentdoc); | callback to transform the props table |
| `transformProps` | **function** (`props`\*: [ComponentDoc](#componentdoc)\[]): [ComponentDoc](#componentdoc); | callback to transform the props table |
| `ParserOptions` | [ParserOptions](#parseroptions) | |

## ComponentDoc
Expand Down Expand Up @@ -94,8 +94,8 @@ _defined in [react-docgen-typescript/lib/parser.d.ts](https://github.com/stylegu
| ------------------------------------ | ------------------------------------------------------------------ | ----------- |
| `componentNameResolver` | [ComponentNameResolver](#componentnameresolver) | |
| `propFilter` | [StaticPropFilter](#staticpropfilter) \| [PropFilter](#propfilter) | |
| `savePropValueAsString` | undefined \| false \| true | |
| `shouldExtractLiteralValuesFromEnum` | undefined \| false \| true | |
| `savePropValueAsString` | boolean | |
| `shouldExtractLiteralValuesFromEnum` | boolean | |

## Method

Expand All @@ -105,14 +105,14 @@ _defined in [react-docgen-typescript/lib/parser.d.ts](https://github.com/stylegu

### properties

| Name | Type | Description |
| -------------- | -------------------------------------------------------------------- | ----------- |
| `description*` | string | |
| `docblock*` | string | |
| `modifiers*` | string\[] | |
| `name*` | string | |
| `params*` | [MethodParameter](#methodparameter)\[] | |
| `returns` | **description**: string \| null**type**: undefined \| string \| null | |
| Name | Type | Description |
| -------------- | ------------------------------------------------------- | ----------- |
| `description*` | string | |
| `docblock*` | string | |
| `modifiers*` | string\[] | |
| `name*` | string | |
| `params*` | [MethodParameter](#methodparameter)\[] | |
| `returns` | **description**: string \| null**type**: string \| null | |

## Props

Expand All @@ -124,7 +124,7 @@ _defined in [react-docgen-typescript/lib/parser.d.ts](https://github.com/stylegu

_defined in [react-docgen-typescript/lib/parser.d.ts](https://github.com/styleguidist/react-docgen-typescript)_

(`exp`\*: [Symbol](#symbol), `source`\*: [SourceFile](#sourcefile)): string | undefined | null | false;
**function** (`exp`\*: [Symbol](#symbol), `source`\*: [SourceFile](#sourcefile)): string | undefined | null | false;

### parameters

Expand All @@ -142,16 +142,16 @@ _defined in [react-docgen-typescript/lib/parser.d.ts](https://github.com/stylegu

### properties

| Name | Type | Description |
| --------------------- | -------------------------- | ----------- |
| `skipPropsWithName` | string\[] \| string | |
| `skipPropsWithoutDoc` | undefined \| false \| true | |
| Name | Type | Description |
| --------------------- | ------------------- | ----------- |
| `skipPropsWithName` | string\[] \| string | |
| `skipPropsWithoutDoc` | boolean | |

## PropFilter

_defined in [react-docgen-typescript/lib/parser.d.ts](https://github.com/styleguidist/react-docgen-typescript)_

(`props`\*: [PropItem](#propitem), `component`\*: [Component](#component)): boolean;
**function** (`props`\*: [PropItem](#propitem), `component`\*: [Component](#component)): boolean;

### parameters

Expand Down Expand Up @@ -237,10 +237,10 @@ _defined in [react-docgen-typescript/lib/parser.d.ts](https://github.com/stylegu

### properties

| Name | Type | Description |
| ------- | ------------------- | ----------- |
| `name*` | string | |
| `raw` | undefined \| string | |
| `value` | any | |
| Name | Type | Description |
| ------- | ------ | ----------- |
| `name*` | string | |
| `raw` | string | |
| `value` | any | |

<!-- END-TSDOC-TYPESCRIPT -->
215 changes: 77 additions & 138 deletions props-info/react-docgen-typescript/tmp-out-typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1462,40 +1462,38 @@
"isOptional": true
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
"type": "reflection",
"declaration": {
"id": 62,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
{
"type": "reflection",
"declaration": {
"id": 62,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"signatures": [
{
"id": 63,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 63,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Program"
}
}
]
"type": {
"type": "reference",
"name": "Program"
}
}
}
]
],
"sources": [
{
"fileName": "node_modules/react-docgen-typescript/lib/parser.d.ts",
"line": 67,
"character": 82
}
]
}
}
}
],
Expand Down Expand Up @@ -1817,17 +1815,8 @@
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
"type": "intrinsic",
"name": "string"
}
}
],
Expand Down Expand Up @@ -2175,21 +2164,8 @@
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "false"
},
{
"type": "intrinsic",
"name": "true"
}
]
"type": "intrinsic",
"name": "boolean"
}
},
{
Expand All @@ -2209,21 +2185,8 @@
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "false"
},
{
"type": "intrinsic",
"name": "true"
}
]
"type": "intrinsic",
"name": "boolean"
}
}
],
Expand Down Expand Up @@ -2448,17 +2411,8 @@
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
"type": "intrinsic",
"name": "string"
}
},
{
Expand Down Expand Up @@ -2622,21 +2576,8 @@
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "false"
},
{
"type": "intrinsic",
"name": "true"
}
]
"type": "intrinsic",
"name": "boolean"
}
}
],
Expand Down Expand Up @@ -3440,60 +3381,58 @@
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
"type": "reflection",
"declaration": {
"id": 165,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
{
"type": "reflection",
"declaration": {
"id": 165,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"signatures": [
{
"id": 166,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"signatures": [
"parameters": [
{
"id": 166,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"id": 167,
"name": "props",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 167,
"name": "props",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 6,
"name": "ComponentDoc"
}
}
}
],
"type": {
"type": "reference",
"id": 6,
"name": "ComponentDoc"
"type": "array",
"elementType": {
"type": "reference",
"id": 6,
"name": "ComponentDoc"
}
}
}
]
],
"type": {
"type": "reference",
"id": 6,
"name": "ComponentDoc"
}
}
}
]
],
"sources": [
{
"fileName": "props-info/react-docgen-typescript/src/types.ts",
"line": 10,
"character": 18
}
]
}
}
}
],
Expand Down
Loading

0 comments on commit 71d4629

Please sign in to comment.