Type Alias CommentDisplayPart

CommentDisplayPart:
    | { kind: "text"; text: string }
    | { kind: "code"; text: string }
    | Models.InlineTagDisplayPart
    | Models.RelativeLinkDisplayPart

Represents a parsed piece of a comment.

Type declaration

  • { kind: "text"; text: string }

    Represents a plain text portion of the comment, may contain markdown

  • { kind: "code"; text: string }

    Represents a code block separated out form the plain text entry so that TypeDoc knows to skip it when parsing relative links and inline tags.

  • Models.InlineTagDisplayPart

    Represents an inline tag like {@link Foo}

    The @link, @linkcode, and @linkplain tags may have a target property set indicating which reflection/url they link to. They may also have a tsLinkText property which includes the part of the text which TypeScript thinks should be displayed as the link text.

  • Models.RelativeLinkDisplayPart

    Represents a reference to a path relative to where the comment resides. This is used to detect and copy relative image links.

    Use FileRegistry to determine what path on disc this refers to.

    This is used for relative links within comments/documents. It is used to mark pieces of text which need to be replaced to make links work properly.

    • kind: "relative-link"
    • target: undefined | number

      A link to either some document outside of the project or a reflection. This may be undefined if the relative path does not exist.

    • targetAnchor: undefined | string

      Anchor within the target page, validated after rendering if possible

    • text: string

      The original relative text from the parsed comment.