Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,52 @@ Example:
Whether "forgotten exports" should be included in the API report file. Forgotten exports are declarations
flagged with [ae-forgotten-export](../messages/ae-forgotten-export.md) warnings.

### apiReport.tagsToReport

Example:

```js
"apiReport": {
. . .
"tagsToReport": {
"@sealed": true,
"@virtual": true,
"@override": true,
"@eventProperty": true,
"@deprecated": true,
"@myCustomTag": true
},
. . .
}
```

**Default value:**

```js
{
"@sealed": true,
"@virtual": true,
"@override": true,
"@eventProperty": true,
"@deprecated": true
}
```

Specifies a list of TSDoc tags that should be reported in the API report file for items whose documentation
contains them. This can be used to include standard TSDoc tags or custom ones. Specified tag names must
begin with `@`.

Tags will appear in the order they are specified in this list. Note that an item's release tag will
always be reported; this behavior cannot be overridden.

To disable a default tag, set its value to `false`:

```js
"tagsToReport": {
"@sealed": false
}
```

## Doc Model Section

Configures how the doc model file (\*.api.json) will be generated.
Expand Down Expand Up @@ -433,6 +479,27 @@ item's file path is `api/ExtractorConfig.ts`, the full URL file path would be

This setting can be omitted if you don't need source code links in your API documentation reference.

### docModel.releaseTagsToTrim

Example:

```js
"docModel": {
. . .
"releaseTagsToTrim": ["@internal", "@alpha"]
}
```

**Default value:** `["@internal"]`

Specifies a list of release tags that will be trimmed from the doc model. Declarations with these
release tags will be excluded from the generated `.api.json` file.

The default value trims `@internal` declarations. You can extend this to also trim `@alpha` or `@beta`
declarations by adding them to the list.

**Possible values:** `"@internal"`, `"@alpha"`, `"@beta"`, `"@public"`

## .d.ts Rollup Section

Configures how the .d.ts rollup file will be generated.
Expand Down Expand Up @@ -746,13 +813,23 @@ for the complete up-to-date table.)_
"logLevel": "warning",
"addToApiReportFile": true
},
"ae-internal-mixed-release-tag": {
"logLevel": "warning",
"addToApiReportFile": true
},
"ae-undocumented": {
"logLevel": "none"
},
"ae-unresolved-inheritdoc-reference": {
"logLevel": "warning",
"addToApiReportFile": true
},
"ae-unresolved-inheritdoc-base": {
"logLevel": "warning",
"addToApiReportFile": true
},
"ae-wrong-input-file-type": {
"logLevel": "error"
}
},
. . .
Expand Down
64 changes: 64 additions & 0 deletions websites/api-extractor.com/docs/pages/messages/ae-undocumented.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: ae-undocumented
---

_"Missing documentation for \_\_\_."_

## Remarks

This message is reported when an exported API item does not have a TSDoc doc comment. This helps ensure
that every public API has proper documentation.

The `ae-undocumented` message is only generated if the API report feature is enabled
(`apiReport.enabled` is `true`).

Because the API report file already annotates undocumented items with `// (undocumented)`,
the `ae-undocumented` message is not logged by default (its default `logLevel` is `"none"`).

## How to fix

Add a TSDoc doc comment to the declaration. For example:

```ts
/**
* Represents the application state.
* @public
*/
export interface IAppState {
/**
* The current user name.
*/
userName: string;
}
```

If you want to see these warnings during your build, add a section like this to your
**api-extractor.json** file:

```js
"messages": {
"extractorMessageReporting": {
"ae-undocumented": {
"logLevel": "warning"
}
}
}
```

To add the messages to your API report file for tracking purposes instead:

```js
"messages": {
"extractorMessageReporting": {
"ae-undocumented": {
"logLevel": "warning",
"addToApiReportFile": true
}
}
}
```

## See also

- [api-extractor.json config file](../configs/api-extractor_json.md#message-reporting-section)
- [Doc comment syntax](../tsdoc/doc_comment_syntax.md)
4 changes: 2 additions & 2 deletions websites/api-extractor.com/docs/pages/setup/custom_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ you can simply fork it and modify the code. Here's the basic files you'd want to
- [MarkdownDocumenter.ts](https://github.com/microsoft/rushstack/blob/main/apps/api-documenter/src/documenters/MarkdownDocumenter.ts) -
This is the main documentation generator that you'd want to study. It illustrates how to traverse the tree of
declarations and render each TypeScript construct. Since the
[TSDoc library](https://github.com/microsoft/tsdoc/tree/master/tsdoc) already provides a nice API for representing
[TSDoc library](https://github.com/microsoft/tsdoc/tree/main/tsdoc) already provides a nice API for representing
a tree of rich text elements, the `MarkdownDocumenter` class takes the approach of producing a huge TSDoc "comment"
representing each page on the web site. It's an unusual approach, but generating TSDoc output from TSDoc input
avoids having to transform all the inner content.
Expand Down Expand Up @@ -56,7 +56,7 @@ and the individual classes such as `ApiClass`, `ApiEnum`, `ApiInterface` have pr

One aspect that may not be entirely obvious is how to render TSDoc into some other format besides Markdown.
For an example of rendering HTML using React, you might also want to look at
[DocHtmlView.tsx](https://github.com/microsoft/tsdoc/blob/master/playground/src/DocHtmlView.tsx)
[DocHtmlView.tsx](https://github.com/microsoft/tsdoc/blob/main/playground/src/DocHtmlView.tsx)
which renders the "HTML" tab for the [TSDoc Playground](https://microsoft.github.io/tsdoc/).

If you get stuck or have questions, the API Extractor developers are usually reachable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Here's a typical usage scenario:

What do we do with these generated Markdown files? There are various options:

- **GitHub**: If you're using GitHub, you can simply commit them to your master branch in
- **GitHub**: If you're using GitHub, you can simply commit them to your main branch in
a "docs" folder, and they will be rendered using GitHub's markdown previewer. Here's an example of how it looks:
[node-core-library.md](https://github.com/microsoft/rushstack-websites/blob/main/websites/api.rushstack.io/docs/pages/node-core-library.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It could be part of a merged declaration or an overloaded function.
The TSDoc syntax provides a special "**declaration reference**" notation for unambiguously identifying declarations
in all these situations. (This aspect of TSDoc is still evolving; it is tracked by
[RFC #9](https://github.com/microsoft/tsdoc/issues/9). The current spec is outlined in
[code-snippets/DeclarationReferences.ts](https://github.com/microsoft/tsdoc/blob/master/spec/code-snippets/DeclarationReferences.ts).)
[code-snippets/DeclarationReferences.ts](https://github.com/microsoft/tsdoc/blob/main/spec/code-snippets/DeclarationReferences.ts).)

## Syntax Examples

Expand Down
2 changes: 1 addition & 1 deletion websites/api-extractor.com/docs/pages/tsdoc/tag_alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@alpha'

**Tag type:** modifier

**TSDoc standardization:** [discretionary](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [discretionary](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

The `@alpha` modifier is one of the four **release tags**. It indicates that an API item is eventually intended
to be public, but currently is in an early stage of development. Third parties should not use "alpha" APIs.
Expand Down
2 changes: 1 addition & 1 deletion websites/api-extractor.com/docs/pages/tsdoc/tag_beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@beta'

**Tag type:** modifier

**TSDoc standardization:** [discretionary](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [discretionary](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

The `@beta` modifier is one of the four **release tags**. It indicates that an API item has been released
as a preview or for experimental purposes. Third parties are encouraged to try it and provide feedback. However,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@defaultValue'

**Tag type:** block tag

**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

This tag is used to document the default value for a field or property, if a value is not assigned explicitly.
This tag should only be used with fields or properties that are members of a class or interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@deprecated'

**Tag type:** block tag

**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

The `@deprecated` tag indicates that an API item is no longer supported and may be removed in a future release.
It should be followed by a sentence describing the recommended alternative. (This is optional in JSDoc,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@eventProperty'

**Tag type:** modifier

**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

When applied to a class or interface property, this indicates that the property
returns an event object that event handlers can be attached to. The event-handling
Expand Down
2 changes: 1 addition & 1 deletion websites/api-extractor.com/docs/pages/tsdoc/tag_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@example'

**Tag type:** block tag

**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

Indicates a documentation section that should be presented as an example
illustrating how to use the API. It may include a code sample.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '{@inheritDoc}'

**Tag type:** inline tag

**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

**Syntax:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@internal'

**Tag type:** modifier

**TSDoc standardization:** [discretionary](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [discretionary](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

The `@internal` modifier is one of the four **release tags**. It indicates that an API item is meant only for usage
by other NPM packages from the same maintainer. Third parties should never use "internal" APIs. To emphasize this,
Expand Down
2 changes: 1 addition & 1 deletion websites/api-extractor.com/docs/pages/tsdoc/tag_link.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '{@link}'

**Tag type:** inline tag

**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

**Syntax:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@override'

**Tag type:** modifier

**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

The `@override` modifier has similar semantics to the `override` keyword in C#. It should only be applied
to a member of a class. The `@override` modifier indicates that the member is overriding (i.e. redefining)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@packageDocumentation'

**Tag type:** modifier

**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

This tag identifies the doc comment that describes an entire NPM package (as opposed to an individual declaration
that is exported by the package). API Documenter will display the `@packageDocumentation` content on the page
Expand Down
2 changes: 1 addition & 1 deletion websites/api-extractor.com/docs/pages/tsdoc/tag_param.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@param'

**Tag type:** block tag

**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

**Syntax:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@privateRemarks'

**Tag type:** block tag

**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

The `@privateRemarks` tag designates additional documentation content that is not intended for a public audience.
Being a block tag, `@privateRemarks` introduces a TSDoc section that contains all comment text up until the
Expand Down
2 changes: 1 addition & 1 deletion websites/api-extractor.com/docs/pages/tsdoc/tag_public.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@public'

**Tag type:** modifier

**TSDoc standardization:** [discretionary](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [discretionary](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

The `@public` modifier is one of the four **release tags**. It indicates that an API item has been officially
released, and is now part of the supported contract for a package. If the [SemVer](https://semver.org/) versioning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@readonly'

**Tag type:** modifier

**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

This modifier tag is used with a property of a class or interface. It indicates that the property should be
documented as being read-only, even if the type signature indicates otherwise.
Expand Down
2 changes: 1 addition & 1 deletion websites/api-extractor.com/docs/pages/tsdoc/tag_remarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@remarks'

**Tag type:** block tag

**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

The main documentation for an API item is separated into a brief "summary" section, optionally followed by
a more detailed "remarks" section. On a documentation web site, index pages (e.g. showing members of a class)
Expand Down
2 changes: 1 addition & 1 deletion websites/api-extractor.com/docs/pages/tsdoc/tag_returns.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@returns'

**Tag type:** block tag

**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

The `@returns` tag is used to document the return value of a function or method parameter. Being a block tag,
`@returns` introduces a TSDoc section that contains all comment text up until the next block tag.
Expand Down
2 changes: 1 addition & 1 deletion websites/api-extractor.com/docs/pages/tsdoc/tag_sealed.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@sealed'

**Tag type:** modifier

**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

The `@sealed` modifier has similar semantics to the `sealed` keyword in C# or `final` keyword in Java.
It should only be applied to a class or a member of a class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@typeParam'

**Tag type:** block tag

**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [core](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

**Syntax:**

Expand Down
2 changes: 1 addition & 1 deletion websites/api-extractor.com/docs/pages/tsdoc/tag_virtual.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: '@virtual'

**Tag type:** modifier

**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/master/tsdoc/src/details/Standardization.ts)
**TSDoc standardization:** [extended](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/details/Standardization.ts)

The `@virtual` modifier has similar semantics to the `virtual` keyword in C#. It should only be applied
to a member of a class. It indicates that the member may be overridden (i.e. redefined) by a corresponding member
Expand Down
1 change: 1 addition & 0 deletions websites/api-extractor.com/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const sidebars = {
'pages/messages/ae-preapproved-bad-release-tag',
'pages/messages/ae-preapproved-unsupported-type',
'pages/messages/ae-setter-with-docs',
'pages/messages/ae-undocumented',
'pages/messages/ae-unresolved-inheritdoc-base',
'pages/messages/ae-unresolved-inheritdoc-reference',
'pages/messages/ae-unresolved-link',
Expand Down
Loading