Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api-extractor] Add support for "@defaultvalue" #837

Merged
merged 4 commits into from
Sep 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/api-extractor/src/aedoc/ApiDocumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class ApiDocumentation {
'@alpha',
'@beta',
'@betadocumentation',
'@defaultvalue',
'@eventproperty',
'@internal',
'@internalremarks',
Expand Down Expand Up @@ -340,6 +341,12 @@ export class ApiDocumentation {
tokenizer.getToken();
this.isOverride = true;
break;
case '@defaultvalue':
// Accept this for now, but don't process it.
// We'll implement it fully when the TSDoc engine is merged.
tokenizer.getToken();
DocElementParser.parse(this, tokenizer);
break;
default:
tokenizer.getToken();
this._reportBadAedocTag(token);
Expand Down
1 change: 1 addition & 0 deletions build-tests/api-extractor-test-05/src/DocClass1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export class SystemEvent {
*
* @remarks
* These are some remarks.
* @defaultvalue a default value for this function
* @public
*/
export class DocClass1 {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@microsoft/api-extractor",
"comment": "Allow doc comments to use TSDoc's \"@defaultvalue\" tag (but the value is not yet passed to the documentation pipeline)",
"type": "patch"
}
],
"packageName": "@microsoft/api-extractor",
"email": "[email protected]"
}