Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Tag

Represents a usage Tag

Hierarchy

  • Tag

Index

Constructors

constructor

  • since

    0.2.1

    Parameters

    • members: string

      The tag contents to parse

    • count: number

      The position of the tag in the usage string

    • required: TagRequirement

      The type of tag

    Returns Tag

Properties

possibles

possibles: Possible[]

The possibilities of this tag

since

0.2.1

repeat

repeat: boolean

If this tag is repeating

since

0.5.0

required

required: number

The type of this tag

since

0.5.0

response

response: string | TagResponse | null

The custom response defined for this possible

since

0.5.0

Static Private pattern

pattern: RegExp = /^([^:]+)(?::([^{}/]+))?(?:{([^,]+)?,?([^}]+)?})?(?:\/(.+)\/(\w+)?)?$/i

Standard regular expressions for matching usage tags

since

0.5.0

Methods

register

  • register(name: string, response: string | TagResponse): boolean
  • Registers a response

    since

    0.5.0

    Parameters

    • name: string

      The argument name the response is for

    • response: string | TagResponse

      The custom response

    Returns boolean

Static Private parseMembers

  • parseMembers(rawMembers: string, count: number): Possible[]
  • Parses members into usable possibles

    since

    0.2.1

    Parameters

    • rawMembers: string

      The tag contents to parse

    • count: number

      The position of the tag in the usage string

    Returns Possible[]

Static Private parseTrueMembers

  • parseTrueMembers(members: string): string[]
  • Parses raw members true members

    since

    0.2.1

    Parameters

    • members: string

      The tag contents to parse

    Returns string[]

Generated using TypeDoc