Creates a new Comment instance.
Gets either the @summary
tag, or a short version of the comment summary
section for rendering in module/namespace pages.
Return the first tag with the given name.
The name of the tag to look for.
The found tag or undefined.
Get all tags with the given tag name.
Static
cloneHelper utility to clone Comment.summary or CommentTag.content
Static
combineDebugging utility for combining parts into a simple string. Not suitable for rendering, but can be useful in tests.
Static
deserializeStatic
serializeStatic
splitSplits the provided parts into a header (first line, as a string) and body (remaining lines). If the header line contains inline tags they will be serialized to a string.
All associated block level tags.
All modifier tags present on the comment, e.g. @alpha
, @beta
.
The content of the comment which is not associated with a block tag.
Optional
Internal
discoveryInternal discovery ID used to prevent symbol comments from
being duplicated on signatures. Only set when the comment was created
from a ts.CommentRange
.
Optional
inheritedIf the comment was inherited from a different "parent" declaration
(see #2545), then it is desirable to know this as any @param
tags
which do not apply should not cause warnings. This is not serialized,
and only set when the comment was created from a ts.CommentRange
.
Optional
labelLabel associated with this reflection, if any (https://tsdoc.org/pages/tags/label/)
Optional
sourceFull path to the file where this comment originated from, if any. This field will not be serialized, so will not be present when handling JSON-revived reflections.
Note: This field is non-enumerable to make testing comment contents with deepEqual
easier.
A model that represents a comment.
Instances of this model are created by the CommentPlugin. You can retrieve comments through the DeclarationReflection.comment property.