Interface JustEventUno<Type, Value>

Type Parameters

  • Type extends string

  • Value

Hierarchy

  • JustEventUno
  • Create event argments as in emitter.emit(event.type, ...event(value)).

    Parameters

    • value: Value

    Returns JustUno<Value>

Properties

Methods

Properties

type: Type

The event type: emitter.emit(event.type)

Methods

  • A functional and normalized way to call emitter.emit(...)

    Parameters

    • emitter: EventEmitterLike | EventTargetLike
    • value: Value

    Returns void

  • A functional and normalized way to call emitter.addListener(...)

    Parameters

    • emitter: EventEmitterLike | EventTargetLike
    • listener: ((value: Value) => unknown)
        • (value: Value): unknown
        • Parameters

          • value: Value

          Returns unknown

    Returns void

  • creates the event listener with type support

    Parameters

    • listener: ((value: Value) => unknown)
        • (value: Value): unknown
        • Parameters

          • value: Value

          Returns unknown

    Returns ((...args: any[]) => any)

      • (...args: any[]): any
      • creates the event listener with type support

        Parameters

        • Rest ...args: any[]

        Returns any

Generated using TypeDoc