Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Delegate<T>

Represent for a single callback function. Use the add() method or the assignment operator = to set the function to call.

Type parameters

  • T

Hierarchy

  • Delegate

Index

Methods

Methods

add

  • add(fn: T): void
  • Set the function to call. When called multiple times, only the final added function will be called.

    Parameters

    • fn: T

    Returns void

clear

  • clear(): void
  • Clear the callback so no function will get called.

    Returns void

remove

  • remove(fn: T): void
  • Remove the given function from the callback. Doesn't do anything if the function is not set as callback.

    Parameters

    • fn: T

    Returns void