The node interface, representing the node of a tree.

interface INode {
    key: string;
    removeListener(name: string): void;
    setListener(name: string, callback: EventCallback, eventTypes?: EventType[]): IListenerSubscription;
}

Implemented by

Properties

Methods

Properties

key: string

The unique key of the node

Methods

  • Remove a listener from this node.

    Parameters

    • name: string

      Name of the listener to remove.

    Returns void

  • Set a listener for events on this node.

    Parameters

    • name: string

      The listener name

    • callback: EventCallback

      The callback for each event.

    • OptionaleventTypes: EventType[]

      The event types requiring notification, or undefined if all event types.

    Returns IListenerSubscription