Class TsDocTag

A tag belonging to a TSDoc. This does not follow the official TSDoc spec. It is a simplified version.

Hierarchy

  • TsDocTag

Constructors

Properties

Methods

Constructors

  • Parameters

    • tag: string

      The kind of tag. Rules:

      • May only consist of letters a-z.
      • Certain tags are normalized to other synonymous tags.
      • Custom tag names are allowed as long as they follow the above rules.
    • name: string = ''

      The tag's name parameter. Rules:

      • Only used for named tags.
      • Must start with a letter.
      • May only contain word characters and ".".
    • description: string[] = []

      The tag's description. Rules:

      • Unnamed tags must have a description.
      • Example tags are formatted as markdown ts-code blocks.
      • Leading dash in the first line is normalized (removed).

    Returns TsDocTag

    Throws

    on named tag missing name.

    Throws

    on unnamed tag missing description.

    Throws

    on unnamed tag trying to set name.

    Throws

    on invalid tag name.

    Throws

    on invalid name.

    Throws

    on invalid markdown code block for example tag.

Properties

description: string[]

The tag's description.

name: string

The tag's name parameter.

tag: string

The kind of tag.

Methods

  • Renders the tag as a TSDoc string.

    Returns string

    Remarks

    Ensures that example tags are formatted as markdown ts-code blocks.

Generated using TypeDoc