@microsoft/tsdoc

  • Version 0.13.2
  • Published
  • 2.53 MB
  • No dependencies
  • MIT license

Install

npm i @microsoft/tsdoc
yarn add @microsoft/tsdoc
pnpm add @microsoft/tsdoc

Overview

A parser for the TypeScript doc comment syntax

Index

Classes

Interfaces

Enums

Type Aliases

Classes

class DocBlock

class DocBlock extends DocNode {}
  • Represents a section that is introduced by a TSDoc block tag. For example, an @example block.

property blockTag

readonly blockTag: DocBlockTag;
  • The TSDoc tag that introduces this section.

property content

readonly content: DocSection;
  • The TSDoc tag that introduces this section.

property kind

readonly kind: string;
  • Modifiers

    • @override

method onGetChildNodes

protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
  • Modifiers

    • @override

class DocBlockTag

class DocBlockTag extends DocNode {}
  • Represents a TSDoc block tag such as @param or @public.

property kind

readonly kind: string;
  • Modifiers

    • @override

property tagName

readonly tagName: string;
  • The TSDoc tag name. TSDoc tag names start with an at-sign (@) followed by ASCII letters using "camelCase" capitalization.

property tagNameWithUpperCase

readonly tagNameWithUpperCase: string;
  • The TSDoc tag name in all capitals, which is used for performing case-insensitive comparisons or lookups.

method getTokenSequence

getTokenSequence: () => TokenSequence;

    method onGetChildNodes

    protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
    • Modifiers

      • @override

    class DocCodeSpan

    class DocCodeSpan extends DocNode {}
    • Represents CommonMark-style code span, i.e. code surrounded by backtick characters.

    property code

    readonly code: string;
    • The text that should be rendered as code, excluding the backtick delimiters.

    property kind

    readonly kind: string;
    • Modifiers

      • @override

    method onGetChildNodes

    protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
    • Modifiers

      • @override

    class DocComment

    class DocComment extends DocNode {}
    • Represents an entire documentation comment conforming to the TSDoc structure. This is the root of the DocNode tree.

    property customBlocks

    readonly customBlocks: readonly DocBlock[];
    • The collection of all DocBlock nodes belonging to this doc comment.

    property deprecatedBlock

    deprecatedBlock: DocBlock;
    • If present, this block indicates that an API item is no loner supported and may be removed in a future release. The @deprecated tag must be followed by a sentence describing the recommended alternative. Deprecation recursively applies to members of a container. For example, if a class is deprecated, then so are all of its members.

    property inheritDocTag

    inheritDocTag: DocInheritDocTag;
    • If this doc comment contains an @inheritDoc tag, it will be extracted and associated with the DocComment.

    property kind

    readonly kind: string;
    • Modifiers

      • @override

    property modifierTagSet

    readonly modifierTagSet: StandardModifierTagSet;
    • The modifier tags for this DocComment.

    property params

    readonly params: DocParamCollection;
    • The collection of parsed @param blocks for this doc comment.

    property privateRemarks

    privateRemarks: DocBlock;
    • The @privateRemarks tag starts a block of additional commentary that is not meant for an external audience. A documentation tool must omit this content from an API reference web site. It should also be omitted when generating a normalized *.d.ts file intended for third-party developers.

      Remarks

      A similar effect could be accomplished by enclosing content inside CommonMark <!-- --> comments, or by moving the content into a separate // TypeScript comment. However, the @privateRemarks tag is a more formal convention.

    property remarksBlock

    remarksBlock: DocBlock;
    • The main documentation for an API item is separated into a brief "summary" section optionally followed by an @remarks block containing additional details.

      Remarks

      Unlike the summary, the remarks block may contain lengthy documentation content. The remarks should not restate information from the summary, since the summary section will always be displayed wherever the remarks section appears. Other sections (e.g. an @example block) will be shown after the remarks section.

    property returnsBlock

    returnsBlock: DocBlock;
    • The @returns block for this doc comment, or undefined if there is not one.

    property seeBlocks

    readonly seeBlocks: readonly DocBlock[];
    • The collection of all @see DockBlockTag nodes belonging to this doc comment.

    property summarySection

    summarySection: DocSection;
    • The main documentation for an API item is separated into a brief "summary" section, optionally followed by an @remarks block containing additional details.

      Remarks

      The summary section should be brief. On a documentation web site, it will be shown on a page that lists summaries for many different API items. On a detail page for a single item, the summary will be shown followed by the remarks section (if any).

    property typeParams

    readonly typeParams: DocParamCollection;
    • The collection of parsed @typeParam blocks for this doc comment.

    method appendCustomBlock

    appendCustomBlock: (block: DocBlock) => void;
    • Append an item to the customBlocks collection.

    method emitAsTsdoc

    emitAsTsdoc: () => string;
    • Generates a doc comment corresponding to the DocComment tree. The output is in a normalized form, and may ignore formatting/spacing from the original input.

      Remarks

      After parsing a string, and possibly modifying the result, emitAsTsdoc() can be used to render the result as a doc comment in a normalized format. It can also be used to emit a DocComment tree that was constructed manually.

      This method is provided as convenience for simple use cases. To customize the output, or if you need to render into a StringBuilder, use the TSDocEmitter class instead.

    method onGetChildNodes

    protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
    • Modifiers

      • @override

    class DocDeclarationReference

    class DocDeclarationReference extends DocNode {}
    • Represents a declaration reference.

      Remarks

      Declaration references are TSDoc expressions used by tags such as {@link} or {@inheritDoc} that need to refer to another declaration.

    property importPath

    readonly importPath: string;
    • The optional import path. If a package name is provided, then if an import path is provided, the path must start with a "/" delimiter; otherwise paths are resolved relative to the source file containing the reference.

      Example: "/path1/path2" Example: "./path1/path2" Example: "../path2/path2"

    property kind

    readonly kind: string;
    • Modifiers

      • @override

    property memberReferences

    readonly memberReferences: readonly DocMemberReference[];
    • The chain of member references that indicate the declaration being referenced. If this list is empty, then either the packageName or importPath must be provided, because the reference refers to a module.

    property packageName

    readonly packageName: string;
    • The optional package name, which may optionally include an NPM scope.

      Example: "@scope/my-package"

    method emitAsTsdoc

    emitAsTsdoc: () => string;
    • Generates the TSDoc representation of this declaration reference.

    method onGetChildNodes

    protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
    • Modifiers

      • @override

    class DocErrorText

    class DocErrorText extends DocNode {}
    • Represents a span of text that contained invalid markup. The characters should be rendered as plain text.

    property errorLocation

    readonly errorLocation: TokenSequence;
    • The range of characters that caused the error. In general these may be somewhat farther ahead in the input stream from the DocErrorText node itself.

      Remarks

      For example, for the malformed HTML tag <a href="123" @ /a>, the DocErrorText node will correspond to the < character that looked like an HTML tag, whereas the error location might be the @ character that caused the trouble.

    property errorMessage

    readonly errorMessage: string;
    • A description of why the character could not be parsed.

    property kind

    readonly kind: string;
    • Modifiers

      • @override

    property messageId

    readonly messageId: TSDocMessageId;
    • The TSDoc error message identifier.

    property text

    readonly text: string;
    • The characters that should be rendered as plain text because they could not be parsed successfully.

    property textExcerpt

    readonly textExcerpt: TokenSequence;

      method onGetChildNodes

      protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocEscapedText

      class DocEscapedText extends DocNode {}
      • Represents a text character that should be escaped as a TSDoc symbol.

        Remarks

        Note that renders will normally apply appropriate escaping when rendering DocPlainText in a format such as HTML or TSDoc. The DocEscapedText node forces a specific escaping that may not be the default.

      property decodedText

      readonly decodedText: string;
      • The text without escaping.

      property encodedText

      readonly encodedText: string;
      • The text sequence including escapes.

      property escapeStyle

      readonly escapeStyle: number;
      • The style of escaping to be performed.

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      method onGetChildNodes

      protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocExcerpt

      class DocExcerpt extends DocNode {}
      • Represents a parsed token sequence.

        Remarks

        When a DocNode is created by parsing a doc comment, it will have DocExcerpt child nodes corresponding to the parsed syntax elements such as names, keywords, punctuation, and spaces. These excerpts indicate the original coordinates of the syntax element, and thus can be used for syntax highlighting and precise error reporting. They could also be used to rewrite specific words in a source file (e.g. renaming a parameter) without disturbing any other characters in the file.

        Every parsed character will correspond to at most one DocExcerpt object. In other words, excerpts never overlap. A given excerpt can span multiple comment lines, and it may contain gaps, for example to skip the * character that starts a new TSDoc comment line.

      property content

      readonly content: TokenSequence;
      • The input token sequence corresponding to this excerpt.

        Remarks

        Note that a token sequence can span multiple input lines and may contain gaps, for example to skip the * character that starts a new TSDoc comment line.

      property excerptKind

      readonly excerptKind: ExcerptKind;
      • Indicates the kind of DocExcerpt.

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      class DocFencedCode

      class DocFencedCode extends DocNode {}
      • Represents CommonMark-style code fence, i.e. a block of program code that starts and ends with a line comprised of three backticks. The opening delimiter can also specify a language for a syntax highlighter.

      property code

      readonly code: string;
      • The text that should be rendered as code.

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      property language

      readonly language: string;
      • A name that can optionally be included after the opening code fence delimiter, on the same line as the three backticks. This name indicates the programming language for the code, which a syntax highlighter may use to style the code block.

        Remarks

        The TSDoc standard requires that the language "ts" should be interpreted to mean TypeScript. Other languages names may be supported, but this is implementation dependent.

        CommonMark refers to this field as the "info string".

      method onGetChildNodes

      protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocHtmlAttribute

      class DocHtmlAttribute extends DocNode {}
      • Represents an HTML attribute inside a DocHtmlStartTag or DocHtmlEndTag.

        Example: href="#" inside <a href="#" />

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      property name

      readonly name: string;
      • The HTML attribute name.

      property spacingAfterEquals

      readonly spacingAfterEquals: string;
      • Explicit whitespace that a renderer should insert after the "=". If undefined, then the renderer can use a formatting rule to generate appropriate spacing.

      property spacingAfterName

      readonly spacingAfterName: string;
      • Explicit whitespace that a renderer should insert after the HTML attribute name. If undefined, then the renderer can use a formatting rule to generate appropriate spacing.

      property spacingAfterValue

      readonly spacingAfterValue: string;
      • Explicit whitespace that a renderer should insert after the HTML attribute name. If undefined, then the renderer can use a formatting rule to generate appropriate spacing.

      property value

      readonly value: string;
      • The HTML attribute value.

      method onGetChildNodes

      protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocHtmlEndTag

      class DocHtmlEndTag extends DocNode {}
      • Represents an HTML end tag. Example: </a>

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      property name

      readonly name: string;
      • The HTML element name.

      method emitAsHtml

      emitAsHtml: () => string;
      • Generates the HTML for this tag.

      method onGetChildNodes

      protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocHtmlStartTag

      class DocHtmlStartTag extends DocNode {}
      • Represents an HTML start tag, which may or may not be self-closing.

        Example: <a href="#" />

      property htmlAttributes

      readonly htmlAttributes: readonly DocHtmlAttribute[];
      • The HTML attributes belonging to this HTML element.

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      property name

      readonly name: string;
      • The HTML element name.

      property selfClosingTag

      readonly selfClosingTag: boolean;
      • If true, then the HTML tag ends with /> instead of >.

      property spacingAfterName

      readonly spacingAfterName: string;
      • Explicit whitespace that a renderer should insert after the HTML element name. If undefined, then the renderer can use a formatting rule to generate appropriate spacing.

      method emitAsHtml

      emitAsHtml: () => string;
      • Generates the HTML for this tag.

      method onGetChildNodes

      protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocInheritDocTag

      class DocInheritDocTag extends DocInlineTagBase {}
      • Represents an {@inheritDoc} tag.

      property declarationReference

      readonly declarationReference: DocDeclarationReference;
      • The declaration that the documentation will be inherited from. If omitted, the documentation will be inherited from the parent class.

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      method getChildNodesForContent

      protected getChildNodesForContent: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocInlineTag

      class DocInlineTag extends DocInlineTagBase {}
      • Represents a generic TSDoc inline tag, including custom tags.

        Remarks

        NOTE: Certain tags such as {@link} and {@inheritDoc} have specialized structures and parser rules, and thus are represented using DocLinkTag or DocInheritDocTag instead. However, if the specialized parser rule encounters a syntax error, but the outer framing is correct, then the parser constructs a generic DocInlineTag instead of DocErrorText. This means, for example, that it is possible sometimes for DocInlineTag.tagName to be "@link".

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      property tagContent

      readonly tagContent: string;
      • The tag content.

        Remarks

        For example, if the tag is {@myTag x=12.34 y=56.78 } then the tag content would be x=12.34 y=56.78 , including the trailing space but not the leading space.

      method getChildNodesForContent

      protected getChildNodesForContent: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocInlineTagBase

      abstract class DocInlineTagBase extends DocNode {}

      property tagName

      readonly tagName: string;
      • The TSDoc tag name. TSDoc tag names start with an at-sign (@) followed by ASCII letters using "camelCase" capitalization.

        Remarks

        For example, if the inline tag is {@link Guid.toString | the toString() method} then the tag name would be @link.

      property tagNameWithUpperCase

      readonly tagNameWithUpperCase: string;
      • The TSDoc tag name in all capitals, which is used for performing case-insensitive comparisons or lookups.

      method getChildNodesForContent

      protected abstract getChildNodesForContent: () => ReadonlyArray<
      DocNode | undefined
      >;
      • Allows child classes to replace the tagContentParticle with a more detailed set of nodes.

        Modifiers

        • @virtual

      method onGetChildNodes

      protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override
        • @sealed

      class DocLinkTag

      class DocLinkTag extends DocInlineTagBase {}
      • Represents an {@link} tag.

      property codeDestination

      readonly codeDestination: DocDeclarationReference;
      • If the link tag refers to a declaration, this returns the declaration reference object; otherwise this property is undefined.

        Remarks

        Either the codeDestination or the urlDestination property will be defined, but never both.

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      property linkText

      readonly linkText: string;
      • An optional text string that is the hyperlink text. If omitted, the documentation renderer will use a default string based on the link itself (e.g. the URL text or the declaration identifier).

        Remarks

        In HTML, the hyperlink can include leading/trailing space characters around the link text. For example, this HTML will cause a web browser to y and also the space character before and after it:

        x<a href="#Button"> y </a> z

        Unlike HTML, TSDoc trims leading/trailing spaces. For example, this TSDoc will be displayed xy z and underline only the y character:

        x{@link Button | y } z

      property urlDestination

      readonly urlDestination: string;
      • If the link tag was an ordinary URI, this returns the URL string; otherwise this property is undefined.

        Remarks

        Either the codeDestination or the urlDestination property will be defined, but never both.

      method getChildNodesForContent

      protected getChildNodesForContent: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocMemberIdentifier

      class DocMemberIdentifier extends DocNode {}

      property hasQuotes

      readonly hasQuotes: boolean;
      • Returns true if the identifier will be rendered as a quoted string literal instead of as a programming language identifier. This is required if the identifier property is not a valid ECMAScript identifier.

      property identifier

      readonly identifier: string;
      • The identifier string without any quote encoding.

        Remarks

        If the value is not a valid ECMAScript identifier, it will be quoted as a string literal during rendering.

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      method isValidIdentifier

      static isValidIdentifier: (identifier: string) => boolean;
      • Tests whether the input string can be used without quotes as a member identifier in a declaration reference. If not, DocMemberIdentifier.hasQuotes will be required.

        Remarks

        In order to be used without quotes, the string must follow the identifier syntax for ECMAScript / TypeScript, and it must not be one of the reserved words used for system selectors (such as instance, static, constructor, etc).

      method onGetChildNodes

      protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocMemberReference

      class DocMemberReference extends DocNode {}
      • A declaration reference includes a chain of member references represented using DocMemberReference nodes.

        Remarks

        For example, example-library#ui.controls.Button.(render:static) is a declaration reference that contains three member references: ui, .controls, and .Button, and .(render:static).

      property hasDot

      readonly hasDot: boolean;
      • True if this member reference is preceded by a dot (".") token. It should be false only for the first member in the chain.

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      property memberIdentifier

      readonly memberIdentifier: DocMemberIdentifier;
      • The identifier for the referenced member.

        Remarks

        Either memberIdentifier or memberSymbol may be specified, but not both.

      property memberSymbol

      readonly memberSymbol: DocMemberSymbol;
      • The ECMAScript 6 symbol expression, which may be used instead of an identifier to indicate the referenced member.

        Remarks

        Either memberIdentifier or memberSymbol may be specified, but not both.

      property selector

      readonly selector: DocMemberSelector;
      • A TSDoc selector, which may be optionally when the identifier or symbol is insufficient to unambiguously determine the referenced declaration.

      method onGetChildNodes

      protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocMemberSelector

      class DocMemberSelector extends DocNode {}

      property errorMessage

      readonly errorMessage: string;
      • If the selectorKind is SelectorKind.Error, this string will be defined and provide more detail about why the string was not valid.

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      property selector

      readonly selector: string;
      • The text representation of the selector.

        Remarks

        For system selectors, it will be a predefined lower case name. For label selectors, it will be an upper case name defined using the {@label} tag. For index selectors, it will be a positive integer.

      property selectorKind

      readonly selectorKind: SelectorKind;
      • Indicates the kind of selector.

      method onGetChildNodes

      protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocMemberSymbol

      class DocMemberSymbol extends DocNode {}
      • Represents a reference to an ECMAScript 6 symbol that is used to identify a member declaration.

        Example 1

        In the declaration reference {@link MyClass.([MySymbols.example]:instance)}, the member symbol [MySymbols.example] might be used to reference a property of the class.

      property kind

      readonly kind: string;
      • Modifiers

        • @override

      property symbolReference

      readonly symbolReference: DocDeclarationReference;
      • The declaration reference for the ECMAScript 6 symbol that will act as the identifier for the member.

      method onGetChildNodes

      protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
      • Modifiers

        • @override

      class DocNode

      abstract class DocNode {}
      • The base class for the parser's Abstract Syntax Tree nodes.

      constructor

      constructor(parameters: IDocNodeParameters | IDocNodeParsedParameters);

        property configuration

        readonly configuration: TSDocConfiguration;

          property kind

          readonly kind: string;
          • Returns a text string that uniquely identifies the child class type. This is used for example by switch statements to efficiently determine the kind of node.

          method getChildNodes

          getChildNodes: () => ReadonlyArray<DocNode>;
          • Returns the list of child nodes for this node. This is useful for visitors that want to scan the tree looking for nodes of a specific type, without having to process intermediary nodes.

          method isParsedParameters

          static isParsedParameters: (
          parameters: IDocNodeParameters | IDocNodeParsedParameters
          ) => parameters is IDocNodeParsedParameters;
          • A type guard that returns true if the input uses the IDocNodeParsedParameters (parser scenario).

            Remarks

            There are two scenarios for constructing DocNode objects. The "builder scenario" constructs the object based on literal strings, does NOT create DocExcerpt child nodes, and generally uses the IDocNodeParameters hierarchy for its constructor parameters. The "parser scenario" constructs the object by parsing a TypeScript source file, does create DocExcerpt child nodes, and generally uses the IDocNodeParsedParameters hierarchy.

          method onGetChildNodes

          protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;

          class DocNodeContainer

          abstract class DocNodeContainer extends DocNode {}
          • DocNodeContainer is the base class for DocNode classes that allow arbitrary child nodes to be added by the consumer. The child classes are DocParagraph and DocSection.

          property nodes

          readonly nodes: readonly DocNode[];
          • The nodes that were added to this container.

          method appendNode

          appendNode: (docNode: DocNode) => void;
          • Append a node to the container.

          method appendNodes

          appendNodes: (docNodes: ReadonlyArray<DocNode>) => void;
          • Append nodes to the container.

          method clearNodes

          clearNodes: () => void;
          • Remove all nodes from the container.

          method onGetChildNodes

          protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
          • Modifiers

            • @override

          class DocNodeManager

          class DocNodeManager {}

          method isAllowedChild

          isAllowedChild: (parentKind: string, childKind: string) => boolean;
          • Returns true if the specified DocNode kind has been registered as an allowable child of the specified parent DocNode kind.

          method registerAllowableChildren

          registerAllowableChildren: (
          parentKind: string,
          childKinds: ReadonlyArray<string>
          ) => void;
          • For the given parent DocNode kind, registers the specified DocNode kinds as being allowable children of the parent.

            Remarks

            To prevent mistakes, DocNodeContainer will report an error if you try to add node that was not registered as an allowable child of the container.

          method registerDocNodes

          registerDocNodes: (
          packageName: string,
          definitions: ReadonlyArray<IDocNodeDefinition>
          ) => void;

          method throwIfNotRegisteredKind

          throwIfNotRegisteredKind: (docNodeKind: string) => void;
          • Reports an error if the specified DocNode kind has not been registered.

          class DocNodeTransforms

          class DocNodeTransforms {}
          • Helper functions that transform DocNode trees.

          method trimSpacesInParagraph

          static trimSpacesInParagraph: (docParagraph: DocParagraph) => DocParagraph;
          • trimSpacesInParagraphNodes() collapses extra spacing characters from plain text nodes.

            Parameter docParagraph

            a DocParagraph containing nodes to be transformed

            Returns

            The transformed child nodes.

            Remarks

            This is useful when emitting HTML, where any number of spaces are equivalent to a single space. It's also useful when emitting Markdown, where spaces can be misinterpreted as an indented code block.

            For example, we might transform this:

            nodes: [
            { kind: PlainText, text: " Here are some " },
            { kind: SoftBreak }
            { kind: PlainText, text: " words" },
            { kind: SoftBreak }
            { kind: InlineTag, text: "{\@inheritDoc}" },
            { kind: PlainText, text: "to process." },
            { kind: PlainText, text: " " },
            { kind: PlainText, text: " " }
            ]

            ...to this:

            nodes: [
            { kind: PlainText, text: "Here are some " },
            { kind: PlainText, text: "words " },
            { kind: InlineTag, text: "{\@inheritDoc}" },
            { kind: PlainText, text: "to process." }
            ]

            Note that in this example, "words " is not merged with the preceding node because its DocPlainText.excerpt cannot span multiple lines.

          class DocParagraph

          class DocParagraph extends DocNodeContainer {}
          • Represents a paragraph of text, similar to a <p> element in HTML. Like CommonMark, the TSDoc syntax uses blank lines to delineate paragraphs instead of explicitly notating them.

          property kind

          readonly kind: string;
          • Modifiers

            • @override

          class DocParamBlock

          class DocParamBlock extends DocBlock {}
          • Represents a parsed @param or @typeParam block, which provides a description for a function parameter.

          property kind

          readonly kind: string;
          • Modifiers

            • @override

          property parameterName

          readonly parameterName: string;
          • The name of the parameter that is being documented. For example "width" in @param width - the width of the object.

          method onGetChildNodes

          protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
          • Modifiers

            • @override

          class DocParamCollection

          class DocParamCollection extends DocNode {}
          • Represents a collection of DocParamBlock objects and provides efficient operations for looking up the documentation for a specified parameter name.

          property blocks

          readonly blocks: readonly DocParamBlock[];
          • Returns the blocks in this collection.

          property count

          readonly count: number;
          • Returns the number of blocks in this collection.

          property kind

          readonly kind: string;
          • Modifiers

            • @override

          method [Symbol.iterator]

          [Symbol.iterator]: () => IterableIterator<DocParamBlock>;
          • Provide an iterator for callers that support it.

          method add

          add: (docParamBlock: DocParamBlock) => void;
          • Adds a new block to the collection.

          method clear

          clear: () => void;
          • Removes all blocks from the collection

          method onGetChildNodes

          protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
          • Modifiers

            • @override

          method tryGetBlockByName

          tryGetBlockByName: (parameterName: string) => DocParamBlock | undefined;
          • Returns the first block whose parameterName matches the specified string.

            Remarks

            If the collection was parsed from an input containing errors, there could potentially be more than one DocParamBlock with the same name. In this situation, tryGetBlockByName() will return the first match that it finds.

            This lookup is optimized using a dictionary.

          class DocPlainText

          class DocPlainText extends DocNode {}
          • Represents a span of comment text that is considered by the parser to contain no special symbols or meaning.

            Remarks

            The text content must not contain newline characters. Use DocSoftBreak to represent manual line splitting.

          property kind

          readonly kind: string;
          • Modifiers

            • @override

          property text

          readonly text: string;
          • The text content.

          property textExcerpt

          readonly textExcerpt: TokenSequence;

            method onGetChildNodes

            protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
            • Modifiers

              • @override

            class DocSection

            class DocSection extends DocNodeContainer {}
            • Represents a general block of rich text.

            property kind

            readonly kind: string;
            • Modifiers

              • @override

            method appendNodeInParagraph

            appendNodeInParagraph: (docNode: DocNode) => void;
            • If the last item in DocSection.nodes is not a DocParagraph, a new paragraph is started. Either way, the provided docNode will be appended to the paragraph.

            method appendNodesInParagraph

            appendNodesInParagraph: (docNodes: ReadonlyArray<DocNode>) => void;

              class DocSoftBreak

              class DocSoftBreak extends DocNode {}
              • Instructs a renderer to insert an explicit newline in the output. (Normally the renderer uses a formatting rule to determine where lines should wrap.)

                Remarks

                In HTML, a soft break is represented as an ASCII newline character (which does not affect the web browser's view), whereas the hard break is the <br /> element (which starts a new line in the web browser's view).

                TSDoc follows the same conventions, except the renderer avoids emitting two empty lines (because that could start a new CommonMark paragraph).

              property kind

              readonly kind: string;
              • Modifiers

                • @override

              method onGetChildNodes

              protected onGetChildNodes: () => ReadonlyArray<DocNode | undefined>;
              • Modifiers

                • @override

              class ModifierTagSet

              class ModifierTagSet {}
              • Represents a set of modifier tags that were extracted from a doc comment.

                Remarks

                TSDoc modifier tags are block tags that do not have any associated rich text content. Instead, their presence or absence acts as an on/off switch, indicating some aspect of the underlying API item. For example, the @internal modifier indicates that a signature is internal (i.e. not part of the public API contract).

              property nodes

              readonly nodes: readonly DocBlockTag[];
              • The original block tag nodes that defined the modifiers in this set, excluding duplicates.

              method addTag

              addTag: (blockTag: DocBlockTag) => boolean;
              • Adds a new modifier tag to the set. If a tag already exists with the same name, then no change is made, and the return value is false.

              method hasTag

              hasTag: (modifierTagDefinition: TSDocTagDefinition) => boolean;
              • Returns true if the set contains a DocBlockTag matching the specified tag definition. Note that synonyms are not considered. The comparison is case-insensitive. The TSDocTagDefinition must be a modifier tag.

                Parameter tagName

                The name of the tag, including the @ prefix For example, @internal

              method hasTagName

              hasTagName: (modifierTagName: string) => boolean;
              • Returns true if the set contains a DocBlockTag with the specified tag name. Note that synonyms are not considered. The comparison is case-insensitive.

                Parameter modifierTagName

                The name of the tag, including the @ prefix For example, @internal

              method tryGetTag

              tryGetTag: (
              modifierTagDefinition: TSDocTagDefinition
              ) => DocBlockTag | undefined;
              • Returns a DocBlockTag matching the specified tag definition, or undefined if no such tag was added to the set. If there were multiple instances, returned object will be the first one to be added.

              class ParserContext

              class ParserContext {}
              • An internal data structure that tracks all the state being built up by the various parser stages.

              constructor

              constructor(configuration: TSDocConfiguration, sourceRange: TextRange);

                property commentRange

                commentRange: TextRange;
                • The text range starting from the opening /** and ending with the closing *\/ delimiter.

                property configuration

                readonly configuration: TSDocConfiguration;
                • The configuration that was provided for the TSDocParser.

                property docComment

                readonly docComment: DocComment;
                • The parsed doc comment object. This is the primary output of the parser.

                property lines

                lines: TextRange[];
                • The text ranges corresponding to the lines of content inside the comment.

                property log

                readonly log: ParserMessageLog;
                • A queryable log that reports warnings and error messages that occurred during parsing.

                property sourceRange

                readonly sourceRange: TextRange;
                • The sourceRange indicates the start and end of the original input that was parsed.

                property tokens

                tokens: Token[];
                • A complete list of all tokens that were extracted from the input lines.

                class ParserMessage

                class ParserMessage {}
                • Represents an error or warning that occurred during parsing.

                constructor

                constructor(parameters: IParserMessageParameters);

                  property docNode

                  readonly docNode: DocNode;

                    property messageId

                    readonly messageId: TSDocMessageId;
                    • A string that uniquely identifies the messages reported by the TSDoc parser.

                    property text

                    readonly text: string;
                    • The message text.

                    property textRange

                    readonly textRange: TextRange;

                      property tokenSequence

                      readonly tokenSequence: TokenSequence;

                        property unformattedText

                        readonly unformattedText: string;
                        • The message text without the default prefix that shows line/column information.

                        method toString

                        toString: () => string;

                          class ParserMessageLog

                          class ParserMessageLog {}
                          • Used to report errors and warnings that occurred during parsing.

                          property messages

                          readonly messages: readonly ParserMessage[];
                          • The unfiltered list of all messages.

                          method addMessage

                          addMessage: (parserMessage: ParserMessage) => void;
                          • Append a message to the log.

                          method addMessageForDocErrorText

                          addMessageForDocErrorText: (docErrorText: DocErrorText) => void;
                          • Append a message associated with a TokenSequence.

                          method addMessageForTextRange

                          addMessageForTextRange: (
                          messageId: TSDocMessageId,
                          messageText: string,
                          textRange: TextRange
                          ) => void;
                          • Append a message associated with a TextRange.

                          method addMessageForTokenSequence

                          addMessageForTokenSequence: (
                          messageId: TSDocMessageId,
                          messageText: string,
                          tokenSequence: TokenSequence,
                          docNode?: DocNode
                          ) => void;
                          • Append a message associated with a TokenSequence.

                          class PlainTextEmitter

                          class PlainTextEmitter {}
                          • Renders a DocNode tree as plain text, without any rich text formatting or markup.

                          method hasAnyTextContent

                          static hasAnyTextContent: {
                          (node: DocNode, requiredCharacters?: number): boolean;
                          (nodes: readonly DocNode[], requiredCharacters?: number): boolean;
                          };
                          • Returns true if the specified node contains any text content.

                            Parameter node

                            this node and all its children will be considered

                            Parameter requiredCharacters

                            The test returns true if at least this many non-spacing characters are found. The default value is 1.

                            Remarks

                            A documentation tool can use this test to report warnings when a developer neglected to write a code comment for a declaration.

                          • Returns true if the specified collection of nodes contains any text content.

                            Parameter nodes

                            the collection of nodes to be tested

                            Parameter requiredCharacters

                            The test returns true if at least this many non-spacing characters are found. The default value is 1.

                            Remarks

                            A documentation tool can use this test to report warnings when a developer neglected to write a code comment for a declaration.

                          class StandardModifierTagSet

                          class StandardModifierTagSet extends ModifierTagSet {}
                          • Extends the ModifierTagSet base class with getters for modifiers that are part of the standardized core tags for TSDoc.

                          method isAlpha

                          isAlpha: () => boolean;
                          • Returns true if the @alpha modifier tag was specified.

                          method isBeta

                          isBeta: () => boolean;
                          • Returns true if the @beta modifier tag was specified.

                          method isEventProperty

                          isEventProperty: () => boolean;
                          • Returns true if the @eventProperty modifier tag was specified.

                          method isExperimental

                          isExperimental: () => boolean;
                          • Returns true if the @experimental modifier tag was specified.

                          method isInternal

                          isInternal: () => boolean;
                          • Returns true if the @internal modifier tag was specified.

                          method isOverride

                          isOverride: () => boolean;
                          • Returns true if the @override modifier tag was specified.

                          method isPackageDocumentation

                          isPackageDocumentation: () => boolean;
                          • Returns true if the @packageDocumentation modifier tag was specified.

                          method isPublic

                          isPublic: () => boolean;
                          • Returns true if the @public modifier tag was specified.

                          method isReadonly

                          isReadonly: () => boolean;
                          • Returns true if the @readonly modifier tag was specified.

                          method isSealed

                          isSealed: () => boolean;
                          • Returns true if the @sealed modifier tag was specified.

                          method isVirtual

                          isVirtual: () => boolean;
                          • Returns true if the @virtual modifier tag was specified.

                          class StandardTags

                          class StandardTags {}
                          • Tags whose meaning is defined by the TSDoc standard.

                          property allDefinitions

                          static allDefinitions: readonly TSDocTagDefinition[];
                          • Returns the full list of all core tags.

                          property alpha

                          static readonly alpha: TSDocTagDefinition;
                          • (Discretionary)

                            Suggested meaning: Designates that an API item's release stage is "alpha". It is intended to be used by third-party developers eventually, but has not yet been released. The tooling may trim the declaration from a public release.

                            Remarks

                            Example implementations: API Extractor

                          property beta

                          static readonly beta: TSDocTagDefinition;
                          • (Discretionary)

                            Suggested meaning: Designates that an API item's release stage is "beta". It has been released to third-party developers experimentally for the purpose of collecting feedback. The API should not be used in production, because its contract may change without notice. The tooling may trim the declaration from a public release, but may include it in a developer preview release.

                            Remarks

                            Example implementations: API Extractor

                            Synonyms: @experimental

                          property decorator

                          static readonly decorator: TSDocTagDefinition;
                          • (Extended)

                            ECMAScript decorators are sometimes an important part of an API contract. However, today the TypeScript compiler does not represent decorators in the .d.ts output files used by API consumers. The @decorator tag provides a workaround, enabling a decorator expressions to be quoted in a doc comment.

                            Example 1

                            class Book {
                            /**
                            * The title of the book.
                            * @decorator `@jsonSerialized`
                            * @decorator `@jsonFormat(JsonFormats.Url)`
                            *
                            +/
                            @jsonSerialized
                            @jsonFormat(JsonFormats.Url)
                            public website: string;
                            }

                          property defaultValue

                          static readonly defaultValue: TSDocTagDefinition;
                          • (Extended)

                            This block tag is used to document the default value for a field or property, if a value is not assigned explicitly.

                            Remarks

                            This tag should only be used with fields or properties that are members of a class or interface.

                          property deprecated

                          static readonly deprecated: TSDocTagDefinition;
                          • (Core)

                            This block tag communicates that an API item is no longer supported and may be removed in a future release. The @deprecated tag is followed by a sentence describing the recommended alternative. It recursively applies to members of the container. For example, if a class is deprecated, then so are all of its members.

                          property eventProperty

                          static readonly eventProperty: TSDocTagDefinition;
                          • (Extended)

                            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 API is implementation-defined, but typically the property return type would be a class with members such as addHandler() and removeHandler(). A documentation tool can display such properties under an "Events" heading instead of the usual "Properties" heading.

                          property example

                          static readonly example: TSDocTagDefinition;
                          • (Extended)

                            Indicates a documentation section that should be presented as an example illustrating how to use the API. It may include a code sample.

                          property experimental

                          static readonly experimental: TSDocTagDefinition;
                          • (Discretionary)

                            Suggested meaning: Same semantics as @beta, but used by tools that don't support an @alpha release stage.

                            Remarks

                            Example implementations: Angular API documenter

                            Synonyms: @beta

                          property inheritDoc

                          static readonly inheritDoc: TSDocTagDefinition;
                          • (Extended)

                            This inline tag is used to automatically generate an API item's documentation by copying it from another API item. The inline tag parameter contains a reference to the other item, which may be an unrelated class, or even an import from a separate NPM package.

                            Remarks

                            What gets copied

                            The @inheritDoc tag does not copy the entire comment body. Only the following components are copied: - summary section - @remarks block - @params blocks - @typeParam blocks - @returns block Other tags such as @defaultValue or @example are not copied, and need to be explicitly included after the @inheritDoc tag.

                            TODO: The notation for API item references is still being standardized. See this issue: https://github.com/microsoft/tsdoc/issues/9

                          property internal

                          static readonly internal: TSDocTagDefinition;
                          • (Discretionary)

                            Suggested meaning: Designates that an API item is not planned to be used by third-party developers. The tooling may trim the declaration from a public release. In some implementations, certain designated packages may be allowed to consume internal API items, e.g. because the packages are components of the same product.

                            Remarks

                            Example implementations: API Extractor

                          property label

                          static readonly label: TSDocTagDefinition;
                          • (Core)

                            The {@label} inline tag is used to label a declaration, so that it can be referenced using a selector in the TSDoc declaration reference notation.

                            Remarks

                            TODO: The {@label} notation is still being standardized. See this issue: https://github.com/microsoft/tsdoc/issues/9

                          static readonly link: TSDocTagDefinition;
                          • (Core)

                            The {@link} inline tag is used to create hyperlinks to other pages in a documentation system or general internet URLs. In particular, it supports expressions for referencing API items.

                            Remarks

                            TODO: The {@link} notation is still being standardized. See this issue: https://github.com/microsoft/tsdoc/issues/9

                          property override

                          static readonly override: TSDocTagDefinition;
                          • (Extended)

                            This modifier has similar semantics to the override keyword in C# or Java. For a member function or property, explicitly indicates that this definition is overriding (i.e. redefining) the definition inherited from the base class. The base class definition would normally be marked as virtual.

                            Remarks

                            A documentation tool may enforce that the @virtual, @override, and/or @sealed modifiers are consistently applied, but this is not required by the TSDoc standard.

                          property packageDocumentation

                          static readonly packageDocumentation: TSDocTagDefinition;
                          • (Core)

                            Used to indicate a doc comment that describes an entire NPM package (as opposed to an individual API item belonging to that package). The @packageDocumentation comment is found in the *.d.ts file that acts as the entry point for the package, and it should be the first /** comment encountered in that file. A comment containing a @packageDocumentation tag should never be used to describe an individual API item.

                          property param

                          static readonly param: TSDocTagDefinition;
                          • (Core)

                            Used to document a function parameter. The @param tag is followed by a parameter name, followed by a hyphen, followed by a description. The TSDoc parser recognizes this syntax and will extract it into a DocParamBlock node.

                          property privateRemarks

                          static readonly privateRemarks: TSDocTagDefinition;
                          • (Core)

                            Starts a section of additional documentation content that is not intended for a public audience. A tool must omit this entire section from the API reference web site, generated *.d.ts file, and any other outputs incorporating the content.

                          property public

                          static readonly public: TSDocTagDefinition;
                          • (Discretionary)

                            Suggested meaning: Designates that an API item's release stage is "public". It has been officially released to third-party developers, and its signature is guaranteed to be stable (e.g. following Semantic Versioning rules).

                            Remarks

                            Example implementations: API Extractor

                          property readonly

                          static readonly readonly: TSDocTagDefinition;
                          • (Extended)

                            This modifier tag indicates that an API item should be documented as being read-only, even if the TypeScript type system may indicate otherwise. For example, suppose a class property has a setter function that always throws an exception explaining that the property cannot be assigned; in this situation, the @readonly modifier can be added so that the property is shown as read-only in the documentation.

                            Remarks

                            Example implementations: API Extractor

                          property remarks

                          static readonly remarks: TSDocTagDefinition;
                          • (Core)

                            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) will show only the brief summaries, whereas a detail pages (e.g. describing a single member) will show the summary followed by the remarks. The @remarks block tag ends the summary section, and begins the remarks section for a doc comment.

                          property returns

                          static readonly returns: TSDocTagDefinition;
                          • (Core)

                            Used to document the return value for a function.

                          property sealed

                          static readonly sealed: TSDocTagDefinition;
                          • (Extended)

                            This modifier has similar semantics to the sealed keyword in C# or Java. For a class, indicates that subclasses must not inherit from the class. For a member function or property, indicates that subclasses must not override (i.e. redefine) the member.

                            Remarks

                            A documentation tool may enforce that the @virtual, @override, and/or @sealed modifiers are consistently applied, but this is not required by the TSDoc standard.

                          property see

                          static readonly see: TSDocTagDefinition;
                          • (Extended)

                            Used to build a list of references to an API item or other resource that may be related to the current item.

                            Remarks

                            For example:

                            /**
                            * Parses a string containing a Uniform Resource Locator (URL).
                            * @see {@link ParsedUrl} for the returned data structure
                            * @see {@link https://tools.ietf.org/html/rfc1738|RFC 1738}
                            * for syntax
                            * @see your developer SDK for code samples
                            * @param url - the string to be parsed
                            * @returns the parsed result
                            &#42;/
                            function parseURL(url: string): ParsedUrl;

                            @see is a block tag. Each block becomes an item in the list of references. For example, a documentation system might render the above blocks as follows:

                            `function parseURL(url: string): ParsedUrl;`
                            Parses a string containing a Uniform Resource Locator (URL).
                            ## See Also
                            - ParsedUrl for the returned data structure
                            - RFC 1738 for syntax
                            - your developer SDK for code samples

                            NOTE: JSDoc attempts to automatically hyperlink the text immediately after @see. Because this is ambiguous with plain text, TSDoc instead requires an explicit {@link} tag to make hyperlinks.

                          property throws

                          static readonly throws: TSDocTagDefinition;
                          • (Extended)

                            Used to document an exception type that may be thrown by a function or property.

                            Remarks

                            A separate @throws block should be used to document each exception type. This tag is for informational purposes only, and does not restrict other types from being thrown. It is suggested, but not required, for the @throws block to start with a line containing only the name of the exception.

                            For example:

                            /**
                            * Retrieves metadata about a book from the catalog.
                            *
                            * @param isbnCode - the ISBN number for the book
                            * @returns the retrieved book object
                            *
                            * @throws {@link IsbnSyntaxError}
                            * This exception is thrown if the input is not a valid ISBN number.
                            *
                            * @throws {@link book-lib#BookNotFoundError}
                            * Thrown if the ISBN number is valid, but no such book exists in the catalog.
                            *
                            * @public
                            &#42;/
                            function fetchBookByIsbn(isbnCode: string): Book;

                          property typeParam

                          static readonly typeParam: TSDocTagDefinition;
                          • (Core)

                            Used to document a generic parameter. The @typeParam tag is followed by a parameter name, followed by a hyphen, followed by a description. The TSDoc parser recognizes this syntax and will extract it into a DocParamBlock node.

                          property virtual

                          static readonly virtual: TSDocTagDefinition;
                          • (Extended)

                            This modifier has similar semantics to the virtual keyword in C# or Java. For a member function or property, explicitly indicates that subclasses may override (i.e. redefine) the member.

                            Remarks

                            A documentation tool may enforce that the @virtual, @override, and/or @sealed modifiers are consistently applied, but this is not required by the TSDoc standard.

                          class StringBuilder

                          class StringBuilder implements IStringBuilder {}
                          • This class allows a large text string to be constructed incrementally by appending small chunks. The final string can be obtained by calling StringBuilder.toString().

                            Remarks

                            A naive approach might use the += operator to append strings: This would have the downside of copying the entire string each time a chunk is appended, resulting in O(n^2) bytes of memory being allocated (and later freed by the garbage collector), and many of the allocations could be very large objects. StringBuilder avoids this overhead by accumulating the chunks in an array, and efficiently joining them when getText() is finally called.

                          constructor

                          constructor();

                            method append

                            append: (text: string) => void;

                            method toString

                            toString: () => string;

                            class TextRange

                            class TextRange {}
                            • Efficiently references a range of text from a string buffer.

                            property buffer

                            readonly buffer: string;
                            • The string buffer that the pos and end indexes refer to.

                            property empty

                            static readonly empty: TextRange;
                            • Used to represent an empty or unknown range.

                            property end

                            readonly end: number;
                            • The (non-inclusive) ending index for the associated text buffer.

                              Remarks

                              The text range corresponds to the range.buffer.substring(range.pos, range.end).

                            property length

                            readonly length: number;
                            • Returns the length of the text range.

                              Remarks

                              This value is calculated as the end property minus the pos property.

                            property pos

                            readonly pos: number;
                            • The starting index into the associated text buffer.

                              Remarks

                              The text range corresponds to the range.buffer.substring(range.pos, range.end).

                            method fromString

                            static fromString: (buffer: string) => TextRange;
                            • Constructs a TextRange that corresponds to an entire string object.

                            method fromStringRange

                            static fromStringRange: (buffer: string, pos: number, end: number) => TextRange;
                            • Constructs a TextRange that corresponds to an entire string object.

                            method getDebugDump

                            getDebugDump: (posDelimiter: string, endDelimiter: string) => string;
                            • Returns a debugging dump of the range, indicated via custom delimiters.

                              Remarks

                              For example if the delimiters are "[" and "]", and the range is 3..5 inside "1234567", then the output would be "12[345]67".

                            method getLocation

                            getLocation: (index: number) => ITextLocation;
                            • Calculates the line and column number for the specified offset into the buffer.

                              Parameter index

                              an integer offset

                              Parameter buffer

                              the buffer

                              Remarks

                              This is a potentially expensive operation.

                            method getNewRange

                            getNewRange: (pos: number, end: number) => TextRange;
                            • Constructs a TextRange that corresponds to a different range of an existing buffer.

                            method isEmpty

                            isEmpty: () => boolean;
                            • Returns true if the length of the range is zero. Note that the object reference may not be equal to TextRange.empty, and the buffer may be different.

                            method toString

                            toString: () => string;
                            • Returns the range from the associated string buffer.

                            class Token

                            class Token {}
                            • Represents a contiguous range of characters extracted from one of the doc comment lines being processed by the Tokenizer. There is a token representing a newline, but otherwise a single token cannot span multiple lines.

                            constructor

                            constructor(kind: TokenKind, range: TextRange, line: TextRange);

                              property kind

                              readonly kind: TokenKind;
                              • The kind of token

                              property line

                              readonly line: TextRange;
                              • The doc comment "line" that this Token was extracted from.

                              property range

                              readonly range: TextRange;
                              • The contiguous input range corresponding to the token. This range will never contain a newline character.

                              method toString

                              toString: () => string;

                                class TokenSequence

                                class TokenSequence {}
                                • Represents a sequence of tokens extracted from ParserContext.tokens. This sequence is defined by a starting index and ending index into that array.

                                constructor

                                constructor(parameters: ITokenSequenceParameters);

                                  property endIndex

                                  readonly endIndex: number;
                                  • The (non-inclusive) ending index into the associated ParserContext.tokens list.

                                  property parserContext

                                  readonly parserContext: ParserContext;
                                  • The associated parser context that the tokens come from.

                                  property startIndex

                                  readonly startIndex: number;
                                  • The starting index into the associated ParserContext.tokens list.

                                  property tokens

                                  readonly tokens: readonly Token[];

                                    method createEmpty

                                    static createEmpty: (parserContext: ParserContext) => TokenSequence;
                                    • Constructs a TokenSequence object with no tokens.

                                    method getContainingTextRange

                                    getContainingTextRange: () => TextRange;
                                    • Returns a TextRange that includes all tokens in the sequence (including any additional characters between doc comment lines).

                                    method getNewSequence

                                    getNewSequence: (startIndex: number, endIndex: number) => TokenSequence;
                                    • Constructs a TokenSequence that corresponds to a different range of tokens, e.g. a subrange.

                                    method isEmpty

                                    isEmpty: () => boolean;

                                      method toString

                                      toString: () => string;
                                      • Returns the concatenated text of all the tokens.

                                      class TSDocConfiguration

                                      class TSDocConfiguration {}
                                      • Configuration for the TSDocParser.

                                      constructor

                                      constructor();

                                        property allTsdocMessageIds

                                        readonly allTsdocMessageIds: readonly TSDocMessageId[];
                                        • Returns the list of TSDocMessageId strings that are implemented by this release of the TSDoc parser.

                                        property docNodeManager

                                        readonly docNodeManager: DocNodeManager;
                                        • Register custom DocNode subclasses.

                                        property supportedTagDefinitions

                                        readonly supportedTagDefinitions: readonly TSDocTagDefinition[];

                                        property tagDefinitions

                                        readonly tagDefinitions: readonly TSDocTagDefinition[];

                                        property validation

                                        readonly validation: TSDocValidationConfiguration;
                                        • Enable/disable validation checks performed by the parser.

                                        method addTagDefinition

                                        addTagDefinition: (tagDefinition: TSDocTagDefinition) => void;
                                        • Define a new TSDoc tag to be recognized by the TSDocParser, and mark it as unsupported. Use TSDocConfiguration.setSupportForTag to mark it as supported.

                                          Remarks

                                          If a tag is "defined" this means that the parser recognizes it and understands its syntax. Whereas if a tag is "supported", this means it is defined AND the application implements the tag.

                                        method addTagDefinitions

                                        addTagDefinitions: (
                                        tagDefinitions: ReadonlyArray<TSDocTagDefinition>,
                                        supported?: boolean | undefined
                                        ) => void;

                                        method clear

                                        clear: (noStandardTags?: boolean) => void;
                                        • Resets the TSDocConfiguration object to its initial empty state.

                                          Parameter noStandardTags

                                          The TSDocConfiguration constructor normally adds definitions for the standard TSDoc tags. Set noStandardTags to true for a completely empty tagDefinitions collection.

                                        method isKnownMessageId

                                        isKnownMessageId: (messageId: TSDocMessageId | string) => boolean;
                                        • Returns true if the specified TSDocMessageId string is implemented by this release of the TSDoc parser. This can be used to detect misspelled identifiers.

                                        method isTagSupported

                                        isTagSupported: (tagDefinition: TSDocTagDefinition) => boolean;
                                        • Returns true if the tag is supported in this configuration.

                                        method setSupportForTag

                                        setSupportForTag: (
                                        tagDefinition: TSDocTagDefinition,
                                        supported: boolean
                                        ) => void;
                                        • Specifies whether the tag definition is supported in this configuration. The parser may issue warnings for unsupported tags.

                                          Remarks

                                          If a tag is "defined" this means that the parser recognizes it and understands its syntax. Whereas if a tag is "supported", this means it is defined AND the application implements the tag.

                                          This function automatically sets TSDocValidationConfiguration.reportUnsupportedTags to true.

                                        method setSupportForTags

                                        setSupportForTags: (
                                        tagDefinitions: ReadonlyArray<TSDocTagDefinition>,
                                        supported: boolean
                                        ) => void;

                                        method tryGetTagDefinition

                                        tryGetTagDefinition: (tagName: string) => TSDocTagDefinition | undefined;
                                        • Return the tag that was defined with the specified name, or undefined if not found.

                                        method tryGetTagDefinitionWithUpperCase

                                        tryGetTagDefinitionWithUpperCase: (
                                        alreadyUpperCaseTagName: string
                                        ) => TSDocTagDefinition | undefined;
                                        • Return the tag that was defined with the specified name, or undefined if not found.

                                        class TSDocEmitter

                                        class TSDocEmitter {}
                                        • Renders a DocNode tree as a code comment.

                                        property eol

                                        readonly eol: string;

                                          method renderComment

                                          renderComment: (output: IStringBuilder, docComment: DocComment) => void;

                                            method renderDeclarationReference

                                            renderDeclarationReference: (
                                            output: IStringBuilder,
                                            declarationReference: DocDeclarationReference
                                            ) => void;

                                              method renderHtmlTag

                                              renderHtmlTag: (
                                              output: IStringBuilder,
                                              htmlTag: DocHtmlStartTag | DocHtmlEndTag
                                              ) => void;

                                                class TSDocParser

                                                class TSDocParser {}
                                                • The main API for parsing TSDoc comments.

                                                constructor

                                                constructor(configuration?: TSDocConfiguration);

                                                  property configuration

                                                  readonly configuration: TSDocConfiguration;
                                                  • The configuration that was provided for the TSDocParser.

                                                  method parseRange

                                                  parseRange: (range: TextRange) => ParserContext;

                                                    method parseString

                                                    parseString: (text: string) => ParserContext;

                                                      class TSDocTagDefinition

                                                      class TSDocTagDefinition {}
                                                      • Defines a TSDoc tag that will be understood by the TSDocParser.

                                                      constructor

                                                      constructor(parameters: ITSDocTagDefinitionParameters);

                                                        property allowMultiple

                                                        readonly allowMultiple: boolean;
                                                        • If true, then this TSDoc tag may appear multiple times in a doc comment. By default, a tag may only appear once.

                                                        property standardization

                                                        readonly standardization: Standardization;
                                                        • Indicates the level of support expected from documentation tools that implement the standard.

                                                        property syntaxKind

                                                        readonly syntaxKind: TSDocTagSyntaxKind;
                                                        • Specifies the expected syntax for this tag.

                                                        property tagName

                                                        readonly tagName: string;
                                                        • The TSDoc tag name. TSDoc tag names start with an at-sign (@) followed by ASCII letters using "camelCase" capitalization.

                                                        property tagNameWithUpperCase

                                                        readonly tagNameWithUpperCase: string;
                                                        • The TSDoc tag name in all capitals, which is used for performing case-insensitive comparisons or lookups.

                                                        method validateTSDocTagName

                                                        static validateTSDocTagName: (tagName: string) => void;
                                                        • Throws an exception if tagName is not a valid TSDoc tag name.

                                                        class TSDocValidationConfiguration

                                                        class TSDocValidationConfiguration {}

                                                        property ignoreUndefinedTags

                                                        ignoreUndefinedTags: boolean;
                                                        • Set ignoreUndefinedTags to true to silently ignore unrecognized tags, instead of reporting a warning.

                                                          Remarks

                                                          Normally the parser will issue errors when it encounters tag names that do not have a corresponding definition in TSDocConfiguration.tagDefinitions. This helps to catch common mistakes such as a misspelled tag.

                                                        property reportUnsupportedTags

                                                        reportUnsupportedTags: boolean;
                                                        • Set reportUnsupportedTags to true to issue a warning for tags that are not supported by your tool.

                                                          Remarks

                                                          The TSDoc standard defines may tags. By default it assumes that if your tool does not implement one of these tags, then it will simply ignore it. But sometimes this may be misleading for developers. (For example, they might write an @example block and then be surprised if it doesn't appear in the documentation output.).

                                                          For a better experience, you can tell the parser which tags you support, and then it will issue warnings wherever unsupported tags are used. This is done using TSDocConfiguration.setSupportForTag. Note that calling that function automatically sets reportUnsupportedTags to true.

                                                        Interfaces

                                                        interface IDocBlockParameters

                                                        interface IDocBlockParameters extends IDocNodeParameters {}

                                                        property blockTag

                                                        blockTag: DocBlockTag;

                                                          interface IDocBlockParsedParameters

                                                          interface IDocBlockParsedParameters extends IDocNodeParsedParameters {}

                                                          property blockTag

                                                          blockTag: DocBlockTag;

                                                            interface IDocBlockTagParameters

                                                            interface IDocBlockTagParameters extends IDocNodeParameters {}

                                                            property tagName

                                                            tagName: string;

                                                              interface IDocBlockTagParsedParameters

                                                              interface IDocBlockTagParsedParameters extends IDocNodeParsedParameters {}

                                                              property tagName

                                                              tagName: string;

                                                                property tagNameExcerpt

                                                                tagNameExcerpt: TokenSequence;

                                                                  interface IDocCodeSpanParameters

                                                                  interface IDocCodeSpanParameters extends IDocNodeParameters {}

                                                                  property code

                                                                  code: string;

                                                                    interface IDocCodeSpanParsedParameters

                                                                    interface IDocCodeSpanParsedParameters extends IDocNodeParsedParameters {}

                                                                    property closingDelimiterExcerpt

                                                                    closingDelimiterExcerpt: TokenSequence;

                                                                      property codeExcerpt

                                                                      codeExcerpt: TokenSequence;

                                                                        property openingDelimiterExcerpt

                                                                        openingDelimiterExcerpt: TokenSequence;

                                                                          interface IDocCommentParameters

                                                                          interface IDocCommentParameters extends IDocNodeParameters {}

                                                                          interface IDocDeclarationReferenceParameters

                                                                          interface IDocDeclarationReferenceParameters extends IDocNodeParameters {}

                                                                          property importPath

                                                                          importPath?: string;

                                                                            property memberReferences

                                                                            memberReferences?: DocMemberReference[];

                                                                              property packageName

                                                                              packageName?: string;

                                                                                interface IDocDeclarationReferenceParsedParameters

                                                                                interface IDocDeclarationReferenceParsedParameters
                                                                                extends IDocNodeParsedParameters {}

                                                                                property importHashExcerpt

                                                                                importHashExcerpt?: TokenSequence;

                                                                                  property importPathExcerpt

                                                                                  importPathExcerpt?: TokenSequence;

                                                                                    property memberReferences

                                                                                    memberReferences?: DocMemberReference[];

                                                                                      property packageNameExcerpt

                                                                                      packageNameExcerpt?: TokenSequence;

                                                                                        property spacingAfterImportHashExcerpt

                                                                                        spacingAfterImportHashExcerpt?: TokenSequence;

                                                                                          interface IDocErrorTextParsedParameters

                                                                                          interface IDocErrorTextParsedParameters extends IDocNodeParsedParameters {}

                                                                                          property errorLocation

                                                                                          errorLocation: TokenSequence;

                                                                                            property errorMessage

                                                                                            errorMessage: string;

                                                                                              property messageId

                                                                                              messageId: TSDocMessageId;

                                                                                                property textExcerpt

                                                                                                textExcerpt: TokenSequence;

                                                                                                  interface IDocEscapedTextParsedParameters

                                                                                                  interface IDocEscapedTextParsedParameters extends IDocNodeParsedParameters {}

                                                                                                  property decodedText

                                                                                                  decodedText: string;

                                                                                                    property encodedTextExcerpt

                                                                                                    encodedTextExcerpt: TokenSequence;

                                                                                                      property escapeStyle

                                                                                                      escapeStyle: EscapeStyle;

                                                                                                        interface IDocExcerptParameters

                                                                                                        interface IDocExcerptParameters extends IDocNodeParameters {}

                                                                                                        property content

                                                                                                        content: TokenSequence;

                                                                                                          property excerptKind

                                                                                                          excerptKind: ExcerptKind;

                                                                                                            interface IDocFencedCodeParameters

                                                                                                            interface IDocFencedCodeParameters extends IDocNodeParameters {}

                                                                                                            property code

                                                                                                            code: string;

                                                                                                              property language

                                                                                                              language: string;

                                                                                                                interface IDocFencedCodeParsedParameters

                                                                                                                interface IDocFencedCodeParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                property closingFenceExcerpt

                                                                                                                closingFenceExcerpt: TokenSequence;

                                                                                                                  property codeExcerpt

                                                                                                                  codeExcerpt: TokenSequence;

                                                                                                                    property languageExcerpt

                                                                                                                    languageExcerpt?: TokenSequence;

                                                                                                                      property openingFenceExcerpt

                                                                                                                      openingFenceExcerpt: TokenSequence;

                                                                                                                        property spacingAfterClosingFenceExcerpt

                                                                                                                        spacingAfterClosingFenceExcerpt?: TokenSequence;

                                                                                                                          property spacingAfterLanguageExcerpt

                                                                                                                          spacingAfterLanguageExcerpt?: TokenSequence;

                                                                                                                            property spacingAfterOpeningFenceExcerpt

                                                                                                                            spacingAfterOpeningFenceExcerpt?: TokenSequence;

                                                                                                                              property spacingBeforeClosingFenceExcerpt

                                                                                                                              spacingBeforeClosingFenceExcerpt?: TokenSequence;

                                                                                                                                interface IDocHtmlAttributeParameters

                                                                                                                                interface IDocHtmlAttributeParameters extends IDocNodeParameters {}

                                                                                                                                property name

                                                                                                                                name: string;

                                                                                                                                  property spacingAfterEquals

                                                                                                                                  spacingAfterEquals?: string;

                                                                                                                                    property spacingAfterName

                                                                                                                                    spacingAfterName?: string;

                                                                                                                                      property spacingAfterValue

                                                                                                                                      spacingAfterValue?: string;

                                                                                                                                        property value

                                                                                                                                        value: string;

                                                                                                                                          interface IDocHtmlAttributeParsedParameters

                                                                                                                                          interface IDocHtmlAttributeParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                                          property equalsExcerpt

                                                                                                                                          equalsExcerpt: TokenSequence;

                                                                                                                                            property nameExcerpt

                                                                                                                                            nameExcerpt: TokenSequence;

                                                                                                                                              property spacingAfterEqualsExcerpt

                                                                                                                                              spacingAfterEqualsExcerpt?: TokenSequence;

                                                                                                                                                property spacingAfterNameExcerpt

                                                                                                                                                spacingAfterNameExcerpt?: TokenSequence;

                                                                                                                                                  property spacingAfterValueExcerpt

                                                                                                                                                  spacingAfterValueExcerpt?: TokenSequence;

                                                                                                                                                    property valueExcerpt

                                                                                                                                                    valueExcerpt: TokenSequence;

                                                                                                                                                      interface IDocHtmlEndTagParameters

                                                                                                                                                      interface IDocHtmlEndTagParameters extends IDocNodeParameters {}

                                                                                                                                                      property name

                                                                                                                                                      name: string;

                                                                                                                                                        interface IDocHtmlEndTagParsedParameters

                                                                                                                                                        interface IDocHtmlEndTagParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                                                        property closingDelimiterExcerpt

                                                                                                                                                        closingDelimiterExcerpt: TokenSequence;

                                                                                                                                                          property nameExcerpt

                                                                                                                                                          nameExcerpt: TokenSequence;

                                                                                                                                                            property openingDelimiterExcerpt

                                                                                                                                                            openingDelimiterExcerpt: TokenSequence;

                                                                                                                                                              property spacingAfterNameExcerpt

                                                                                                                                                              spacingAfterNameExcerpt?: TokenSequence;

                                                                                                                                                                interface IDocHtmlStartTagParameters

                                                                                                                                                                interface IDocHtmlStartTagParameters extends IDocNodeParameters {}

                                                                                                                                                                property htmlAttributes

                                                                                                                                                                htmlAttributes?: DocHtmlAttribute[];

                                                                                                                                                                  property name

                                                                                                                                                                  name: string;

                                                                                                                                                                    property selfClosingTag

                                                                                                                                                                    selfClosingTag?: boolean;

                                                                                                                                                                      property spacingAfterName

                                                                                                                                                                      spacingAfterName?: string;

                                                                                                                                                                        interface IDocHtmlStartTagParsedParameters

                                                                                                                                                                        interface IDocHtmlStartTagParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                                                                        property closingDelimiterExcerpt

                                                                                                                                                                        closingDelimiterExcerpt: TokenSequence;

                                                                                                                                                                          property htmlAttributes

                                                                                                                                                                          htmlAttributes: DocHtmlAttribute[];

                                                                                                                                                                            property nameExcerpt

                                                                                                                                                                            nameExcerpt: TokenSequence;

                                                                                                                                                                              property openingDelimiterExcerpt

                                                                                                                                                                              openingDelimiterExcerpt: TokenSequence;

                                                                                                                                                                                property selfClosingTag

                                                                                                                                                                                selfClosingTag: boolean;

                                                                                                                                                                                  property spacingAfterNameExcerpt

                                                                                                                                                                                  spacingAfterNameExcerpt?: TokenSequence;

                                                                                                                                                                                    interface IDocInheritDocTagParameters

                                                                                                                                                                                    interface IDocInheritDocTagParameters extends IDocInlineTagBaseParameters {}

                                                                                                                                                                                    property declarationReference

                                                                                                                                                                                    declarationReference?: DocDeclarationReference;

                                                                                                                                                                                      interface IDocInheritDocTagParsedParameters

                                                                                                                                                                                      interface IDocInheritDocTagParsedParameters
                                                                                                                                                                                      extends IDocInlineTagBaseParsedParameters {}

                                                                                                                                                                                      property declarationReference

                                                                                                                                                                                      declarationReference?: DocDeclarationReference;

                                                                                                                                                                                        interface IDocInlineTagBaseParameters

                                                                                                                                                                                        interface IDocInlineTagBaseParameters extends IDocNodeParameters {}

                                                                                                                                                                                        property tagName

                                                                                                                                                                                        tagName: string;

                                                                                                                                                                                          interface IDocInlineTagBaseParsedParameters

                                                                                                                                                                                          interface IDocInlineTagBaseParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                                                                                          property closingDelimiterExcerpt

                                                                                                                                                                                          closingDelimiterExcerpt: TokenSequence;

                                                                                                                                                                                            property openingDelimiterExcerpt

                                                                                                                                                                                            openingDelimiterExcerpt: TokenSequence;

                                                                                                                                                                                              property spacingAfterTagNameExcerpt

                                                                                                                                                                                              spacingAfterTagNameExcerpt?: TokenSequence;

                                                                                                                                                                                                property tagName

                                                                                                                                                                                                tagName: string;

                                                                                                                                                                                                  property tagNameExcerpt

                                                                                                                                                                                                  tagNameExcerpt: TokenSequence;

                                                                                                                                                                                                    interface IDocInlineTagParameters

                                                                                                                                                                                                    interface IDocInlineTagParameters extends IDocInlineTagBaseParameters {}

                                                                                                                                                                                                    property tagContent

                                                                                                                                                                                                    tagContent: string;

                                                                                                                                                                                                      interface IDocInlineTagParsedParameters

                                                                                                                                                                                                      interface IDocInlineTagParsedParameters extends IDocInlineTagBaseParsedParameters {}

                                                                                                                                                                                                      property tagContentExcerpt

                                                                                                                                                                                                      tagContentExcerpt?: TokenSequence;

                                                                                                                                                                                                        interface IDocLinkTagParameters

                                                                                                                                                                                                        interface IDocLinkTagParameters extends IDocInlineTagBaseParameters {}

                                                                                                                                                                                                        property codeDestination

                                                                                                                                                                                                        codeDestination?: DocDeclarationReference;

                                                                                                                                                                                                          property linkText

                                                                                                                                                                                                          linkText?: string;

                                                                                                                                                                                                            property urlDestination

                                                                                                                                                                                                            urlDestination?: string;

                                                                                                                                                                                                              interface IDocLinkTagParsedParameters

                                                                                                                                                                                                              interface IDocLinkTagParsedParameters extends IDocInlineTagBaseParsedParameters {}

                                                                                                                                                                                                              property codeDestination

                                                                                                                                                                                                              codeDestination?: DocDeclarationReference;

                                                                                                                                                                                                                property linkTextExcerpt

                                                                                                                                                                                                                linkTextExcerpt?: TokenSequence;

                                                                                                                                                                                                                  property pipeExcerpt

                                                                                                                                                                                                                  pipeExcerpt?: TokenSequence;

                                                                                                                                                                                                                    property spacingAfterDestinationExcerpt

                                                                                                                                                                                                                    spacingAfterDestinationExcerpt?: TokenSequence;

                                                                                                                                                                                                                      property spacingAfterLinkTextExcerpt

                                                                                                                                                                                                                      spacingAfterLinkTextExcerpt?: TokenSequence;

                                                                                                                                                                                                                        property spacingAfterPipeExcerpt

                                                                                                                                                                                                                        spacingAfterPipeExcerpt?: TokenSequence;

                                                                                                                                                                                                                          property urlDestinationExcerpt

                                                                                                                                                                                                                          urlDestinationExcerpt?: TokenSequence;

                                                                                                                                                                                                                            interface IDocMemberIdentifierParameters

                                                                                                                                                                                                                            interface IDocMemberIdentifierParameters extends IDocNodeParameters {}

                                                                                                                                                                                                                            property identifier

                                                                                                                                                                                                                            identifier: string;

                                                                                                                                                                                                                              interface IDocMemberIdentifierParsedParameters

                                                                                                                                                                                                                              interface IDocMemberIdentifierParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                                                                                                                              property identifierExcerpt

                                                                                                                                                                                                                              identifierExcerpt: TokenSequence;

                                                                                                                                                                                                                                property leftQuoteExcerpt

                                                                                                                                                                                                                                leftQuoteExcerpt?: TokenSequence;

                                                                                                                                                                                                                                  property rightQuoteExcerpt

                                                                                                                                                                                                                                  rightQuoteExcerpt?: TokenSequence;

                                                                                                                                                                                                                                    interface IDocMemberReferenceParameters

                                                                                                                                                                                                                                    interface IDocMemberReferenceParameters extends IDocNodeParameters {}

                                                                                                                                                                                                                                    property hasDot

                                                                                                                                                                                                                                    hasDot: boolean;

                                                                                                                                                                                                                                      property memberIdentifier

                                                                                                                                                                                                                                      memberIdentifier?: DocMemberIdentifier;

                                                                                                                                                                                                                                        property memberSymbol

                                                                                                                                                                                                                                        memberSymbol?: DocMemberSymbol;

                                                                                                                                                                                                                                          property selector

                                                                                                                                                                                                                                          selector?: DocMemberSelector;

                                                                                                                                                                                                                                            interface IDocMemberReferenceParsedParameters

                                                                                                                                                                                                                                            interface IDocMemberReferenceParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                                                                                                                                            property colonExcerpt

                                                                                                                                                                                                                                            colonExcerpt?: TokenSequence;

                                                                                                                                                                                                                                              property dotExcerpt

                                                                                                                                                                                                                                              dotExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                property leftParenthesisExcerpt

                                                                                                                                                                                                                                                leftParenthesisExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                  property memberIdentifier

                                                                                                                                                                                                                                                  memberIdentifier?: DocMemberIdentifier;

                                                                                                                                                                                                                                                    property memberSymbol

                                                                                                                                                                                                                                                    memberSymbol?: DocMemberSymbol;

                                                                                                                                                                                                                                                      property rightParenthesisExcerpt

                                                                                                                                                                                                                                                      rightParenthesisExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                        property selector

                                                                                                                                                                                                                                                        selector?: DocMemberSelector;

                                                                                                                                                                                                                                                          property spacingAfterColonExcerpt

                                                                                                                                                                                                                                                          spacingAfterColonExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                            property spacingAfterDotExcerpt

                                                                                                                                                                                                                                                            spacingAfterDotExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                              property spacingAfterLeftParenthesisExcerpt

                                                                                                                                                                                                                                                              spacingAfterLeftParenthesisExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                property spacingAfterMemberExcerpt

                                                                                                                                                                                                                                                                spacingAfterMemberExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                  property spacingAfterRightParenthesisExcerpt

                                                                                                                                                                                                                                                                  spacingAfterRightParenthesisExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                    property spacingAfterSelectorExcerpt

                                                                                                                                                                                                                                                                    spacingAfterSelectorExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                      interface IDocMemberSelectorParameters

                                                                                                                                                                                                                                                                      interface IDocMemberSelectorParameters extends IDocNodeParameters {}

                                                                                                                                                                                                                                                                      property selector

                                                                                                                                                                                                                                                                      selector: string;

                                                                                                                                                                                                                                                                        interface IDocMemberSelectorParsedParameters

                                                                                                                                                                                                                                                                        interface IDocMemberSelectorParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                                                                                                                                                                        property selectorExcerpt

                                                                                                                                                                                                                                                                        selectorExcerpt: TokenSequence;

                                                                                                                                                                                                                                                                          interface IDocMemberSymbolParameters

                                                                                                                                                                                                                                                                          interface IDocMemberSymbolParameters extends IDocNodeParameters {}

                                                                                                                                                                                                                                                                          property symbolReference

                                                                                                                                                                                                                                                                          symbolReference: DocDeclarationReference;

                                                                                                                                                                                                                                                                            interface IDocMemberSymbolParsedParameters

                                                                                                                                                                                                                                                                            interface IDocMemberSymbolParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                                                                                                                                                                            property leftBracketExcerpt

                                                                                                                                                                                                                                                                            leftBracketExcerpt: TokenSequence;

                                                                                                                                                                                                                                                                              property rightBracketExcerpt

                                                                                                                                                                                                                                                                              rightBracketExcerpt: TokenSequence;

                                                                                                                                                                                                                                                                                property spacingAfterLeftBracketExcerpt

                                                                                                                                                                                                                                                                                spacingAfterLeftBracketExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                                  property symbolReference

                                                                                                                                                                                                                                                                                  symbolReference: DocDeclarationReference;

                                                                                                                                                                                                                                                                                    interface IDocNodeContainerParameters

                                                                                                                                                                                                                                                                                    interface IDocNodeContainerParameters extends IDocNodeParameters {}

                                                                                                                                                                                                                                                                                    interface IDocNodeContainerParsedParameters

                                                                                                                                                                                                                                                                                    interface IDocNodeContainerParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                                                                                                                                                                                    interface IDocNodeDefinition

                                                                                                                                                                                                                                                                                    interface IDocNodeDefinition {}

                                                                                                                                                                                                                                                                                      property constructor

                                                                                                                                                                                                                                                                                      constructor: DocNodeConstructor;

                                                                                                                                                                                                                                                                                        property docNodeKind

                                                                                                                                                                                                                                                                                        docNodeKind: string;

                                                                                                                                                                                                                                                                                          interface IDocNodeParameters

                                                                                                                                                                                                                                                                                          interface IDocNodeParameters {}
                                                                                                                                                                                                                                                                                          • Constructor parameters for DocNode.

                                                                                                                                                                                                                                                                                            Remarks

                                                                                                                                                                                                                                                                                            There are two scenarios for constructing DocNode objects. The "builder scenario" constructs the object based on literal strings, does NOT create DocExcerpt child nodes, and generally uses the IDocNodeParameters hierarchy for its constructor parameters. The "parser scenario" constructs the object by parsing a TypeScript source file, does create DocExcerpt child nodes, and generally uses the IDocNodeParsedParameters hierarchy.

                                                                                                                                                                                                                                                                                          property configuration

                                                                                                                                                                                                                                                                                          configuration: TSDocConfiguration;

                                                                                                                                                                                                                                                                                            interface IDocNodeParsedParameters

                                                                                                                                                                                                                                                                                            interface IDocNodeParsedParameters {}
                                                                                                                                                                                                                                                                                            • Constructor parameters for DocNode.

                                                                                                                                                                                                                                                                                              Remarks

                                                                                                                                                                                                                                                                                              There are two scenarios for constructing DocNode objects. The "builder scenario" constructs the object based on literal strings, does NOT create DocExcerpt child nodes, and generally uses the IDocNodeParameters hierarchy for its constructor parameters. The "parser scenario" constructs the object by parsing a TypeScript source file, does create DocExcerpt child nodes, and generally uses the IDocNodeParsedParameters hierarchy.

                                                                                                                                                                                                                                                                                            property configuration

                                                                                                                                                                                                                                                                                            configuration: TSDocConfiguration;

                                                                                                                                                                                                                                                                                              property parsed

                                                                                                                                                                                                                                                                                              parsed: true;
                                                                                                                                                                                                                                                                                              • This is a marker used by DocNode.isParsedParameters to determine whether the constructor was invoked using IDocNodeParameters (builder scenario) or IDocNodeParsedParameters (parser scenario).

                                                                                                                                                                                                                                                                                              interface IDocParagraphParameters

                                                                                                                                                                                                                                                                                              interface IDocParagraphParameters extends IDocNodeContainerParameters {}

                                                                                                                                                                                                                                                                                              interface IDocParamBlockParameters

                                                                                                                                                                                                                                                                                              interface IDocParamBlockParameters extends IDocBlockParameters {}

                                                                                                                                                                                                                                                                                              property parameterName

                                                                                                                                                                                                                                                                                              parameterName: string;

                                                                                                                                                                                                                                                                                                interface IDocParamBlockParsedParameters

                                                                                                                                                                                                                                                                                                interface IDocParamBlockParsedParameters extends IDocBlockParsedParameters {}

                                                                                                                                                                                                                                                                                                property hyphenExcerpt

                                                                                                                                                                                                                                                                                                hyphenExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                                                  property parameterName

                                                                                                                                                                                                                                                                                                  parameterName: string;

                                                                                                                                                                                                                                                                                                    property parameterNameExcerpt

                                                                                                                                                                                                                                                                                                    parameterNameExcerpt: TokenSequence;

                                                                                                                                                                                                                                                                                                      property spacingAfterHyphenExcerpt

                                                                                                                                                                                                                                                                                                      spacingAfterHyphenExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                                                        property spacingAfterParameterNameExcerpt

                                                                                                                                                                                                                                                                                                        spacingAfterParameterNameExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                                                          property spacingBeforeParameterNameExcerpt

                                                                                                                                                                                                                                                                                                          spacingBeforeParameterNameExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                                                            property unsupportedJsdocOptionalNameOpenBracketExcerpt

                                                                                                                                                                                                                                                                                                            unsupportedJsdocOptionalNameOpenBracketExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                                                              property unsupportedJsdocOptionalNameRestExcerpt

                                                                                                                                                                                                                                                                                                              unsupportedJsdocOptionalNameRestExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                                                                property unsupportedJsdocTypeAfterHyphenExcerpt

                                                                                                                                                                                                                                                                                                                unsupportedJsdocTypeAfterHyphenExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                                                                  property unsupportedJsdocTypeAfterParameterNameExcerpt

                                                                                                                                                                                                                                                                                                                  unsupportedJsdocTypeAfterParameterNameExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                                                                    property unsupportedJsdocTypeBeforeParameterNameExcerpt

                                                                                                                                                                                                                                                                                                                    unsupportedJsdocTypeBeforeParameterNameExcerpt?: TokenSequence;

                                                                                                                                                                                                                                                                                                                      interface IDocParamCollectionParameters

                                                                                                                                                                                                                                                                                                                      interface IDocParamCollectionParameters extends IDocNodeParameters {}

                                                                                                                                                                                                                                                                                                                      interface IDocPlainTextParameters

                                                                                                                                                                                                                                                                                                                      interface IDocPlainTextParameters extends IDocNodeParameters {}

                                                                                                                                                                                                                                                                                                                      property text

                                                                                                                                                                                                                                                                                                                      text: string;

                                                                                                                                                                                                                                                                                                                        interface IDocPlainTextParsedParameters

                                                                                                                                                                                                                                                                                                                        interface IDocPlainTextParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                                                                                                                                                                                                                        property textExcerpt

                                                                                                                                                                                                                                                                                                                        textExcerpt: TokenSequence;

                                                                                                                                                                                                                                                                                                                          interface IDocSectionParameters

                                                                                                                                                                                                                                                                                                                          interface IDocSectionParameters extends IDocNodeContainerParameters {}

                                                                                                                                                                                                                                                                                                                          interface IDocSectionParsedParameters

                                                                                                                                                                                                                                                                                                                          interface IDocSectionParsedParameters extends IDocNodeContainerParsedParameters {}

                                                                                                                                                                                                                                                                                                                          interface IDocSoftBreakParameters

                                                                                                                                                                                                                                                                                                                          interface IDocSoftBreakParameters extends IDocNodeParameters {}

                                                                                                                                                                                                                                                                                                                          interface IDocSoftBreakParsedParameters

                                                                                                                                                                                                                                                                                                                          interface IDocSoftBreakParsedParameters extends IDocNodeParsedParameters {}

                                                                                                                                                                                                                                                                                                                          property softBreakExcerpt

                                                                                                                                                                                                                                                                                                                          softBreakExcerpt: TokenSequence;

                                                                                                                                                                                                                                                                                                                            interface IParserMessageParameters

                                                                                                                                                                                                                                                                                                                            interface IParserMessageParameters {}

                                                                                                                                                                                                                                                                                                                            property docNode

                                                                                                                                                                                                                                                                                                                            docNode?: DocNode;

                                                                                                                                                                                                                                                                                                                              property messageId

                                                                                                                                                                                                                                                                                                                              messageId: TSDocMessageId;

                                                                                                                                                                                                                                                                                                                                property messageText

                                                                                                                                                                                                                                                                                                                                messageText: string;

                                                                                                                                                                                                                                                                                                                                  property textRange

                                                                                                                                                                                                                                                                                                                                  textRange: TextRange;

                                                                                                                                                                                                                                                                                                                                    property tokenSequence

                                                                                                                                                                                                                                                                                                                                    tokenSequence?: TokenSequence;

                                                                                                                                                                                                                                                                                                                                      interface IStringBuilder

                                                                                                                                                                                                                                                                                                                                      interface IStringBuilder {}
                                                                                                                                                                                                                                                                                                                                      • An interface for a builder object that allows a large text string to be constructed incrementally by appending small chunks.

                                                                                                                                                                                                                                                                                                                                        Remarks

                                                                                                                                                                                                                                                                                                                                        StringBuilder is the default implementation of this contract.

                                                                                                                                                                                                                                                                                                                                      method append

                                                                                                                                                                                                                                                                                                                                      append: (text: string) => void;
                                                                                                                                                                                                                                                                                                                                      • Append the specified text to the buffer.

                                                                                                                                                                                                                                                                                                                                      method toString

                                                                                                                                                                                                                                                                                                                                      toString: () => string;
                                                                                                                                                                                                                                                                                                                                      • Returns a single string containing all the text that was appended to the buffer so far.

                                                                                                                                                                                                                                                                                                                                        Remarks

                                                                                                                                                                                                                                                                                                                                        This is a potentially expensive operation.

                                                                                                                                                                                                                                                                                                                                      interface ITextLocation

                                                                                                                                                                                                                                                                                                                                      interface ITextLocation {}
                                                                                                                                                                                                                                                                                                                                      • Text coordinates represented as a line number and column number.

                                                                                                                                                                                                                                                                                                                                        Remarks

                                                                                                                                                                                                                                                                                                                                        The first character in a file is considered to be in column 1 of line 1. The location with column 0 and line 0 is used to represent an empty, unspecified, or unknown location.

                                                                                                                                                                                                                                                                                                                                      property column

                                                                                                                                                                                                                                                                                                                                      column: number;

                                                                                                                                                                                                                                                                                                                                        property line

                                                                                                                                                                                                                                                                                                                                        line: number;

                                                                                                                                                                                                                                                                                                                                          interface ITokenSequenceParameters

                                                                                                                                                                                                                                                                                                                                          interface ITokenSequenceParameters {}

                                                                                                                                                                                                                                                                                                                                          property endIndex

                                                                                                                                                                                                                                                                                                                                          endIndex: number;

                                                                                                                                                                                                                                                                                                                                            property parserContext

                                                                                                                                                                                                                                                                                                                                            parserContext: ParserContext;

                                                                                                                                                                                                                                                                                                                                              property startIndex

                                                                                                                                                                                                                                                                                                                                              startIndex: number;

                                                                                                                                                                                                                                                                                                                                                interface ITSDocTagDefinitionParameters

                                                                                                                                                                                                                                                                                                                                                interface ITSDocTagDefinitionParameters {}

                                                                                                                                                                                                                                                                                                                                                property allowMultiple

                                                                                                                                                                                                                                                                                                                                                allowMultiple?: boolean;

                                                                                                                                                                                                                                                                                                                                                  property syntaxKind

                                                                                                                                                                                                                                                                                                                                                  syntaxKind: TSDocTagSyntaxKind;

                                                                                                                                                                                                                                                                                                                                                    property tagName

                                                                                                                                                                                                                                                                                                                                                    tagName: string;

                                                                                                                                                                                                                                                                                                                                                      Enums

                                                                                                                                                                                                                                                                                                                                                      enum DocNodeKind

                                                                                                                                                                                                                                                                                                                                                      const enum DocNodeKind {
                                                                                                                                                                                                                                                                                                                                                      Block = 'Block',
                                                                                                                                                                                                                                                                                                                                                      BlockTag = 'BlockTag',
                                                                                                                                                                                                                                                                                                                                                      Excerpt = 'Excerpt',
                                                                                                                                                                                                                                                                                                                                                      FencedCode = 'FencedCode',
                                                                                                                                                                                                                                                                                                                                                      CodeSpan = 'CodeSpan',
                                                                                                                                                                                                                                                                                                                                                      Comment = 'Comment',
                                                                                                                                                                                                                                                                                                                                                      DeclarationReference = 'DeclarationReference',
                                                                                                                                                                                                                                                                                                                                                      ErrorText = 'ErrorText',
                                                                                                                                                                                                                                                                                                                                                      EscapedText = 'EscapedText',
                                                                                                                                                                                                                                                                                                                                                      HtmlAttribute = 'HtmlAttribute',
                                                                                                                                                                                                                                                                                                                                                      HtmlEndTag = 'HtmlEndTag',
                                                                                                                                                                                                                                                                                                                                                      HtmlStartTag = 'HtmlStartTag',
                                                                                                                                                                                                                                                                                                                                                      InheritDocTag = 'InheritDocTag',
                                                                                                                                                                                                                                                                                                                                                      InlineTag = 'InlineTag',
                                                                                                                                                                                                                                                                                                                                                      LinkTag = 'LinkTag',
                                                                                                                                                                                                                                                                                                                                                      MemberIdentifier = 'MemberIdentifier',
                                                                                                                                                                                                                                                                                                                                                      MemberReference = 'MemberReference',
                                                                                                                                                                                                                                                                                                                                                      MemberSelector = 'MemberSelector',
                                                                                                                                                                                                                                                                                                                                                      MemberSymbol = 'MemberSymbol',
                                                                                                                                                                                                                                                                                                                                                      Paragraph = 'Paragraph',
                                                                                                                                                                                                                                                                                                                                                      ParamBlock = 'ParamBlock',
                                                                                                                                                                                                                                                                                                                                                      ParamCollection = 'ParamCollection',
                                                                                                                                                                                                                                                                                                                                                      PlainText = 'PlainText',
                                                                                                                                                                                                                                                                                                                                                      Section = 'Section',
                                                                                                                                                                                                                                                                                                                                                      SoftBreak = 'SoftBreak',
                                                                                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                                                                                      • Indicates the type of DocNode.

                                                                                                                                                                                                                                                                                                                                                        Remarks

                                                                                                                                                                                                                                                                                                                                                        When creating custom subclasses of DocNode, it's recommended to create your own const enum to identify them. To avoid naming conflicts between projects, the enum value should be a string comprised of your full NPM package name, followed by a "#" symbol, followed by the class name (without the "Doc" prefix).

                                                                                                                                                                                                                                                                                                                                                      member Block

                                                                                                                                                                                                                                                                                                                                                      Block = 'Block'

                                                                                                                                                                                                                                                                                                                                                        member BlockTag

                                                                                                                                                                                                                                                                                                                                                        BlockTag = 'BlockTag'

                                                                                                                                                                                                                                                                                                                                                          member CodeSpan

                                                                                                                                                                                                                                                                                                                                                          CodeSpan = 'CodeSpan'

                                                                                                                                                                                                                                                                                                                                                            member Comment

                                                                                                                                                                                                                                                                                                                                                            Comment = 'Comment'

                                                                                                                                                                                                                                                                                                                                                              member DeclarationReference

                                                                                                                                                                                                                                                                                                                                                              DeclarationReference = 'DeclarationReference'

                                                                                                                                                                                                                                                                                                                                                                member ErrorText

                                                                                                                                                                                                                                                                                                                                                                ErrorText = 'ErrorText'

                                                                                                                                                                                                                                                                                                                                                                  member EscapedText

                                                                                                                                                                                                                                                                                                                                                                  EscapedText = 'EscapedText'

                                                                                                                                                                                                                                                                                                                                                                    member Excerpt

                                                                                                                                                                                                                                                                                                                                                                    Excerpt = 'Excerpt'

                                                                                                                                                                                                                                                                                                                                                                      member FencedCode

                                                                                                                                                                                                                                                                                                                                                                      FencedCode = 'FencedCode'

                                                                                                                                                                                                                                                                                                                                                                        member HtmlAttribute

                                                                                                                                                                                                                                                                                                                                                                        HtmlAttribute = 'HtmlAttribute'

                                                                                                                                                                                                                                                                                                                                                                          member HtmlEndTag

                                                                                                                                                                                                                                                                                                                                                                          HtmlEndTag = 'HtmlEndTag'

                                                                                                                                                                                                                                                                                                                                                                            member HtmlStartTag

                                                                                                                                                                                                                                                                                                                                                                            HtmlStartTag = 'HtmlStartTag'

                                                                                                                                                                                                                                                                                                                                                                              member InheritDocTag

                                                                                                                                                                                                                                                                                                                                                                              InheritDocTag = 'InheritDocTag'

                                                                                                                                                                                                                                                                                                                                                                                member InlineTag

                                                                                                                                                                                                                                                                                                                                                                                InlineTag = 'InlineTag'

                                                                                                                                                                                                                                                                                                                                                                                  member LinkTag

                                                                                                                                                                                                                                                                                                                                                                                  LinkTag = 'LinkTag'

                                                                                                                                                                                                                                                                                                                                                                                    member MemberIdentifier

                                                                                                                                                                                                                                                                                                                                                                                    MemberIdentifier = 'MemberIdentifier'

                                                                                                                                                                                                                                                                                                                                                                                      member MemberReference

                                                                                                                                                                                                                                                                                                                                                                                      MemberReference = 'MemberReference'

                                                                                                                                                                                                                                                                                                                                                                                        member MemberSelector

                                                                                                                                                                                                                                                                                                                                                                                        MemberSelector = 'MemberSelector'

                                                                                                                                                                                                                                                                                                                                                                                          member MemberSymbol

                                                                                                                                                                                                                                                                                                                                                                                          MemberSymbol = 'MemberSymbol'

                                                                                                                                                                                                                                                                                                                                                                                            member Paragraph

                                                                                                                                                                                                                                                                                                                                                                                            Paragraph = 'Paragraph'

                                                                                                                                                                                                                                                                                                                                                                                              member ParamBlock

                                                                                                                                                                                                                                                                                                                                                                                              ParamBlock = 'ParamBlock'

                                                                                                                                                                                                                                                                                                                                                                                                member ParamCollection

                                                                                                                                                                                                                                                                                                                                                                                                ParamCollection = 'ParamCollection'

                                                                                                                                                                                                                                                                                                                                                                                                  member PlainText

                                                                                                                                                                                                                                                                                                                                                                                                  PlainText = 'PlainText'

                                                                                                                                                                                                                                                                                                                                                                                                    member Section

                                                                                                                                                                                                                                                                                                                                                                                                    Section = 'Section'

                                                                                                                                                                                                                                                                                                                                                                                                      member SoftBreak

                                                                                                                                                                                                                                                                                                                                                                                                      SoftBreak = 'SoftBreak'

                                                                                                                                                                                                                                                                                                                                                                                                        enum EscapeStyle

                                                                                                                                                                                                                                                                                                                                                                                                        enum EscapeStyle {
                                                                                                                                                                                                                                                                                                                                                                                                        CommonMarkBackslash = 0,
                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                        • The style of escaping to be used with DocEscapedText.

                                                                                                                                                                                                                                                                                                                                                                                                        member CommonMarkBackslash

                                                                                                                                                                                                                                                                                                                                                                                                        CommonMarkBackslash = 0
                                                                                                                                                                                                                                                                                                                                                                                                        • Use a backslash symbol to escape the character.

                                                                                                                                                                                                                                                                                                                                                                                                        enum ExcerptKind

                                                                                                                                                                                                                                                                                                                                                                                                        const enum ExcerptKind {
                                                                                                                                                                                                                                                                                                                                                                                                        Spacing = 'Spacing',
                                                                                                                                                                                                                                                                                                                                                                                                        BlockTag = 'BlockTag',
                                                                                                                                                                                                                                                                                                                                                                                                        CodeSpan_OpeningDelimiter = 'CodeSpan_OpeningDelimiter',
                                                                                                                                                                                                                                                                                                                                                                                                        CodeSpan_Code = 'CodeSpan_Code',
                                                                                                                                                                                                                                                                                                                                                                                                        CodeSpan_ClosingDelimiter = 'CodeSpan_ClosingDelimiter',
                                                                                                                                                                                                                                                                                                                                                                                                        DeclarationReference_PackageName = 'DeclarationReference_PackageName',
                                                                                                                                                                                                                                                                                                                                                                                                        DeclarationReference_ImportPath = 'DeclarationReference_ImportPath',
                                                                                                                                                                                                                                                                                                                                                                                                        DeclarationReference_ImportHash = 'DeclarationReference_ImportHash',
                                                                                                                                                                                                                                                                                                                                                                                                        ErrorText = 'ErrorText',
                                                                                                                                                                                                                                                                                                                                                                                                        NonstandardText = 'NonstandardText',
                                                                                                                                                                                                                                                                                                                                                                                                        EscapedText = 'EscapedText',
                                                                                                                                                                                                                                                                                                                                                                                                        FencedCode_OpeningFence = 'FencedCode_OpeningFence',
                                                                                                                                                                                                                                                                                                                                                                                                        FencedCode_Language = 'FencedCode_Language',
                                                                                                                                                                                                                                                                                                                                                                                                        FencedCode_Code = 'FencedCode_Code',
                                                                                                                                                                                                                                                                                                                                                                                                        FencedCode_ClosingFence = 'FencedCode_ClosingFence',
                                                                                                                                                                                                                                                                                                                                                                                                        HtmlAttribute_Name = 'HtmlAttribute_Name',
                                                                                                                                                                                                                                                                                                                                                                                                        HtmlAttribute_Equals = 'HtmlAttribute_Equals',
                                                                                                                                                                                                                                                                                                                                                                                                        HtmlAttribute_Value = 'HtmlAttribute_Value'