Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NodeRegistry

Hierarchy

  • UndertakerRegistry
    • NodeRegistry

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private options

options: NodeTarget

Methods

get

  • get<TTaskFunction>(taskName: string): TTaskFunction
  • Returns the task with that name or undefined if no task is registered with that name. Useful for custom task storage. Custom registries can override this method when inheriting from this default registry.

    Type parameters

    • TTaskFunction

    Parameters

    • taskName: string

      Name of task.

    Returns TTaskFunction

init

  • init(taker: Undertaker): void

set

  • set<TTaskFunction>(taskName: string, fn: TTaskFunction): TTaskFunction
  • Adds a task to the registry. If set modifies a task, it should return the new task so Undertaker can properly maintain metadata for the task. Useful for adding custom behavior to every task as it is registered in the system. Custom registries can override this method when inheriting from this default registry.

    Type parameters

    • TTaskFunction

    Parameters

    • taskName: string

      Name of task.

    • fn: TTaskFunction

      Task function.

    Returns TTaskFunction

tasks

  • tasks(): {}
  • Returns an object listing all tasks in the registry. Necessary to override if the get method is overridden for custom task storage. Custom registries can override this when when inheriting from this default registry.

    Returns {}

    • [taskName: string]: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

Generated using TypeDoc