-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial checkin typedoc for api
- Loading branch information
1 parent
e335483
commit 47064cb
Showing
40 changed files
with
4,939 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Table of contents | ||
|
||
- [Overview](#overview) | ||
- [Installation](#installation) | ||
- [API](#api) | ||
- [PropsInfoExtractorFunction](#propsinfoextractorfunction) | ||
|
||
# Overview | ||
|
||
Typescript definitions of the component-controls specification. | ||
|
||
# Installation | ||
|
||
This package is usually installed as part of the @component-controls package, but you can also install it standalone: | ||
|
||
```bash | ||
$ npm install @component-controls/specification --save-dev | ||
``` | ||
|
||
# API | ||
|
||
<tsdoc-typescript entry="./src/propsinfo.ts"/> | ||
|
||
<!-- START-TSDOC-TYPESCRIPT --> | ||
|
||
## PropsInfoExtractorFunction | ||
|
||
callback function to extract props info table - ie docgen type libraries | ||
used to extract displayName, and props tables for a component | ||
|
||
(`fileName`\*: string, `componentName`: undefined | string, `source`: undefined | string): Promise<[ComponentInfo](#componentinfo) | undefined> | [ComponentInfo](#componentinfo) | undefined; | ||
|
||
### parameters | ||
|
||
| Name | Type | Description | | ||
| --------------- | ------------------- | ----------- | | ||
| `fileName*` | string | | | ||
| `componentName` | undefined \| string | | | ||
| `source` | undefined \| string | | | ||
|
||
<!-- END-TSDOC-TYPESCRIPT --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ComponentInfo } from './components'; | ||
|
||
/** | ||
* callback function to extract props info table - ie docgen type libraries | ||
* used to extract displayName, and props tables for a component | ||
* | ||
* @param fileName full name and path of the component path react-docgen needs it to extract babel configurations. | ||
* @param componentName optional component name react-docgen-typescript supports multiple exports for a file react-docgne does not use it. | ||
* @param source optional soure, saves time if its already loaded react-docgen accepts source as input parameter react-docgen-typescript does not use it. | ||
* | ||
* @returns async or normal function that loads ComponentInfo props info. | ||
*/ | ||
export type PropsInfoExtractorFunction = ( | ||
fileName: string, | ||
componentName?: string, | ||
source?: string, | ||
) => Promise<ComponentInfo | undefined> | ComponentInfo | undefined; |
Oops, something went wrong.