wima
    Preparing search index...

    Class Events<T>

    A buffer of events that are of the same type.

    //Creates a new event dispatcher with string as its event payload.
    const dispatch = new Events<string>()

    //adds an event to dispatcher
    dispatch.write("hello there")

    //gets all events in the event dispatch
    dispatch.each(event=>{
    console.log(event.data)//outputs "hello world"
    })

    //Removes all buffered events.
    dispatch.clear()

    Type Parameters

    • T
    Index

    Constructors

    Methods