Skip to content

Commit

Permalink
fix: docs tuple parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Oct 28, 2020
1 parent faf4b63 commit c33abb2
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 65 deletions.
4 changes: 2 additions & 2 deletions core/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ merge a configuration passed through cli or tools, with the build configration f

_defined in [@component-controls/config/src/index.ts](https://github.com/ccontrols/component-controls/tree/master/core/config/src/index.ts#L168)_

**function** mergeBuildConfiguration(`config`\*: [BuildConfiguration](#buildconfiguration)): ;
**function** mergeBuildConfiguration(`config`\*: [BuildConfiguration](#buildconfiguration)): [BuildConfiguration](#buildconfiguration);

### parameters

| Name | Type | Description |
| --------- | ----------------------------------------- | ----------- |
| `config*` | [BuildConfiguration](#buildconfiguration) | |
| `returns` | | |
| `returns` | [BuildConfiguration](#buildconfiguration) | |

<!-- END-TSDOC-TYPESCRIPT -->
8 changes: 4 additions & 4 deletions core/logger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ _defined in [@component-controls/logger/src/index.ts](https://github.com/ccontro

### properties

| Name | Type | Description |
| ---------- | ------------------------- | ----------- |
| `colors*` | \[number, number, number] | |
| `logLevel` | [LogLevel](#loglevel) | |
| Name | Type | Description |
| ---------- | --------------------- | ----------- |
| `colors*` | | |
| `logLevel` | [LogLevel](#loglevel) | |

## LogLevel

Expand Down
40 changes: 21 additions & 19 deletions misc/ts-markdown/src/tsdoc/extract-tsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,25 +418,27 @@ export const extractTSDoc = (
}

case 'tuple': {
return [
{
type: 'paragraph',
children: [
{ type: 'text', value: '[' },
...p.elements.reduce((acc: Node[], t: any, idx: number) => {
const r = extractPropType(t);
if (idx < p.elements.length - 1) {
r.push({
type: 'text',
value: ', ',
});
}
return [...acc, ...r];
}, []),
{ type: 'text', value: ']' },
],
},
];
return p.elements
? [
{
type: 'paragraph',
children: [
{ type: 'text', value: '[' },
...p.elements.reduce((acc: Node[], t: any, idx: number) => {
const r = extractPropType(t);
if (idx < p.elements.length - 1) {
r.push({
type: 'text',
value: ', ',
});
}
return [...acc, ...r];
}, []),
{ type: 'text', value: ']' },
],
},
]
: [];
}
case 'stringLiteral': {
return [
Expand Down
41 changes: 1 addition & 40 deletions props-info/react-docgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
- [Scope](#scope)
- [ParserPlugin](#parserplugin)
- [ParserPluginWithOptions](#parserpluginwithoptions)
- [DecoratorsPluginOptions](#decoratorspluginoptions)
- [PipelineOperatorPluginOptions](#pipelineoperatorpluginoptions)
- [FlowPluginOptions](#flowpluginoptions)

# Overview

Expand Down Expand Up @@ -200,42 +197,6 @@ _defined in [@babel/parser/typings/babel-parser.d.ts](https://github.com/babel/b

_defined in [@babel/parser/typings/babel-parser.d.ts](https://github.com/babel/babel/tree/master/packages/babel-parser)_

\['decorators', [DecoratorsPluginOptions](#decoratorspluginoptions)] \| \['pipelineOperator', [PipelineOperatorPluginOptions](#pipelineoperatorpluginoptions)] \| \['flow', [FlowPluginOptions](#flowpluginoptions)]

## DecoratorsPluginOptions

_defined in [@babel/parser/typings/babel-parser.d.ts](https://github.com/babel/babel/tree/master/packages/babel-parser)_



### properties

| Name | Type | Description |
| ------------------------ | ------- | ----------- |
| `decoratorsBeforeExport` | boolean | |

## PipelineOperatorPluginOptions

_defined in [@babel/parser/typings/babel-parser.d.ts](https://github.com/babel/babel/tree/master/packages/babel-parser)_



### properties

| Name | Type | Description |
| ----------- | -------------------- | ----------- |
| `proposal*` | 'minimal' \| 'smart' | |

## FlowPluginOptions

_defined in [@babel/parser/typings/babel-parser.d.ts](https://github.com/babel/babel/tree/master/packages/babel-parser)_



### properties

| Name | Type | Description |
| ----- | ------- | ----------- |
| `all` | boolean | |
\| \|

<!-- END-TSDOC-TYPESCRIPT -->

0 comments on commit c33abb2

Please sign in to comment.