Skip to content

Commit

Permalink
feat: add repo source link for typedoc
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Mar 26, 2020
1 parent 47064cb commit ddba93e
Show file tree
Hide file tree
Showing 13 changed files with 807 additions and 739 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -142,7 +142,7 @@ Some of the guiding design goals for this library:

<!-- START-PACKAGE-SECTION -->

## [@component-controls/react-docgen-info](https://github.com/ccontrols/component-controls/blob/master/frameworks/react)
## [@component-controls/react-docgen-info](https://github.com/ccontrols/component-controls/blob/master/props-info/react-docgen)

Component controls react-docgen props info loader

Expand All @@ -156,7 +156,7 @@ Extract props info from react components. Although the latest version of `react-

<!-- START-PACKAGE-SECTION -->

## [@component-controls/react-docgen-typescript-info](https://github.com/ccontrols/component-controls/blob/master/frameworks/react)
## [@component-controls/react-docgen-typescript-info](https://github.com/ccontrols/component-controls/blob/master/props-info/react-docgen-typescript)

Component controls react-docgen-typescript props info loader

Expand Down
21 changes: 9 additions & 12 deletions core/specification/README.md
Expand Up @@ -3,7 +3,7 @@
- [Overview](#overview)
- [Installation](#installation)
- [API](#api)
- [PropsInfoExtractorFunction](#propsinfoextractorfunction)
- [MethodParameterType](#methodparametertype)

# Overview

Expand All @@ -19,23 +19,20 @@ $ npm install @component-controls/specification --save-dev

# API

<tsdoc-typescript entry="./src/propsinfo.ts"/>
<tsdoc-typescript entry="./src/test.ts"/>

<!-- START-TSDOC-TYPESCRIPT -->

## PropsInfoExtractorFunction
## MethodParameterType

callback function to extract props info table - ie docgen type libraries
used to extract displayName, and props tables for a component
_defined in [@component-controls/specification/src/test.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/test.ts#L1)_

(`fileName`\*: string, `componentName`: undefined | string, `source`: undefined | string): Promise&lt;[ComponentInfo](#componentinfo) | undefined> | [ComponentInfo](#componentinfo) | undefined;

### parameters

| Name | Type | Description |
| --------------- | ------------------- | ----------- |
| `fileName*` | string | |
| `componentName` | undefined \| string | |
| `source` | undefined \| string | |
### properties

| Name | Type | Description |
| ------- | ------ | ----------- |
| `name*` | string | |

<!-- END-TSDOC-TYPESCRIPT -->
3 changes: 3 additions & 0 deletions core/specification/src/test.ts
@@ -0,0 +1,3 @@
export interface MethodParameterType {
name: string;
}
188 changes: 36 additions & 152 deletions core/specification/tmp-out-typedoc.json
Expand Up @@ -7,190 +7,74 @@
"children": [
{
"id": 1,
"name": "\"propsinfo\"",
"name": "\"test\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/Users/atanasster/component-controls/core/specification/src/propsinfo.ts",
"originalName": "/Users/atanasster/component-controls/core/specification/src/test.ts",
"children": [
{
"id": 2,
"name": "PropsInfoExtractorFunction",
"kind": 4194304,
"kindString": "Type alias",
"name": "MethodParameterType",
"kind": 256,
"kindString": "Interface",
"flags": {
"isExported": true
},
"comment": {
"shortText": "callback function to extract props info table - ie docgen type libraries\nused to extract displayName, and props tables for a component",
"tags": [
{
"tag": "param",
"text": "full name and path of the component path react-docgen needs it to extract babel configurations.",
"param": "fileName"
},
{
"tag": "param",
"text": "optional component name react-docgen-typescript supports multiple exports for a file react-docgne does not use it.",
"param": "componentName"
},
{
"tag": "param",
"text": "optional soure, saves time if its already loaded react-docgen accepts source as input parameter react-docgen-typescript does not use it.\n",
"param": "source"
},
{
"tag": "returns",
"text": "async or normal function that loads ComponentInfo props info.\n"
}
]
},
"sources": [
"children": [
{
"fileName": "propsinfo.ts",
"line": 13,
"character": 38
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 3,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"name": "name",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 4,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 5,
"name": "fileName",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 6,
"name": "componentName",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
},
{
"id": 7,
"name": "source",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"typeArguments": [
{
"type": "union",
"types": [
{
"type": "reference",
"name": "ComponentInfo"
},
{
"type": "intrinsic",
"name": "undefined"
}
]
}
],
"name": "Promise"
},
{
"type": "reference",
"name": "ComponentInfo"
},
{
"type": "intrinsic",
"name": "undefined"
}
]
}
}
],
"sources": [
{
"fileName": "propsinfo.ts",
"line": 13,
"character": 40
"fileName": "test.ts",
"line": 2,
"character": 6
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Properties",
"kind": 1024,
"children": [
3
]
}
}
],
"sources": [
{
"fileName": "test.ts",
"line": 1,
"character": 36
}
]
}
],
"groups": [
{
"title": "Type aliases",
"kind": 4194304,
"title": "Interfaces",
"kind": 256,
"children": [
2
]
}
],
"sources": [
{
"fileName": "propsinfo.ts",
"fileName": "test.ts",
"line": 1,
"character": 0
}
Expand Down

0 comments on commit ddba93e

Please sign in to comment.