Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TagDefinition

Hierarchy

  • TagDefinition

Index

Constructors

Properties

Constructors

constructor

  • new TagDefinition(name: string, options?: object): TagDefinition
  • Create a new TagDefinition instance.

    Parameters

    • name: string

      Name of the tag.

    • Default value options: object = {}

      Tag options.

      • Optional applies?: function

        Function to check whether the tag value applies -> the configuration file is loaded.

          • (val: string): boolean
          • Parameters

            • val: string

            Returns boolean

      • Optional map?: function

        Function to transform a tag value before further processing it.

          • (val: string): any
          • Parameters

            • val: string

            Returns any

      • Optional score?: function

        Function to compute a score value for the tag.

          • (val: string): number
          • Parameters

            • val: string

            Returns number

    Returns TagDefinition

Properties

applies

applies: function

Type declaration

    • (val: string): boolean
    • Parameters

      • val: string

      Returns boolean

map

map: function

Type declaration

    • (val: string): any
    • Parameters

      • val: string

      Returns any

name

name: string

Name of the tag

score

score: function

Type declaration

    • (val: string): number
    • Parameters

      • val: string

      Returns number