Options
All
  • Public
  • Public/Protected
  • All
Menu

Helps to manage options. The main addition to simply using a Set are the toggle functions and the support for temporarily disabling an option.

Hierarchy

  • OptionsSet

Index

Constructors

Properties

_disabled: Map<string, string> = ...
_enabled: Map<string, string> = ...

Methods

  • clear(): void
  • delete(name: string): void
  • Deletes the option with the given name.

    Parameters

    • name: string

      the option's name

    Returns void

  • disable(name: string): void
  • Disables the option with the given name. The option and its value are kept and can be re-enabled.

    Parameters

    • name: string

      the option's name

    Returns void

  • enable(name: string): void
  • Re-enables the option with the given name.

    Parameters

    • name: string

      the option's name

    Returns void

  • get(name: string): undefined | string
  • Returns the value of the given name.

    Parameters

    • name: string

      the option's name

    Returns undefined | string

  • getAll(): IterableIterator<string>
  • Returns the names of all options.

    Returns IterableIterator<string>

  • getDisabled(): IterableIterator<string>
  • Returns the names of all disabled options.

    Returns IterableIterator<string>

  • getEnabled(): IterableIterator<string>
  • Returns the names of all enabled options.

    Returns IterableIterator<string>

  • set(name: string, value: string): void
  • Sets the option with the associated value.

    Parameters

    • name: string

      the option's name

    • value: string

      the option's value

    Returns void

  • toggleEnabled(name: string): void
  • Toggles the option with the given name, i.e. enables it if it is disabled and disables it if it is enabled.

    Parameters

    • name: string

      the option's name

    Returns void

  • toggleIsSet(name: string, value: string): void
  • Sets the option with the given name if it is not set and deletes it if it is enabled.

    Parameters

    • name: string

      the option's name

    • value: string

      the option's value

    Returns void

Generated using TypeDoc