-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for @DefaultValue TSDoc tag
- Loading branch information
Showing
4 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
src/__tests__/data/StatelessWithDefaultValueAndDescriptionJsDoc.tsx
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,14 @@ | ||
import * as React from 'react'; | ||
|
||
export interface StatelessWithDefaultValueAndDescriptionJsDocProps { | ||
/** | ||
* The content | ||
* | ||
* @defaultValue hello | ||
*/ | ||
myProp: string; | ||
} | ||
/** StatelessWithDefaultValueAndDescriptionJsDoc description */ | ||
export const StatelessWithDefaultValueAndDescriptionJsDoc: React.StatelessComponent<StatelessWithDefaultValueAndDescriptionJsDocProps> = props => ( | ||
<div>My Property = {props.myProp}</div> | ||
); |
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,12 @@ | ||
import * as React from 'react'; | ||
|
||
export interface StatelessWithDefaultValueOnlyJsDocProps { | ||
/** | ||
* @defaultValue hello | ||
*/ | ||
myProp: string; | ||
} | ||
/** StatelessWithDefaultValueOnlyJsDoc description */ | ||
export const StatelessWithDefaultValueOnlyJsDoc: React.StatelessComponent<StatelessWithDefaultValueOnlyJsDocProps> = props => ( | ||
<div>My Property = {props.myProp}</div> | ||
); |
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