Interface JustEventUno<Type, Value>
Type Parameters
-
Type extends string
-
Value
- JustEventUno(value: Value): JustUno<Value>
-
Returns JustUno<Value>
Properties
type
type: Type
Methods
emitBy
- emitBy(emitter: EventEmitterLike | EventTargetLike, value: Value): void
-
Parameters
-
emitter: EventEmitterLike | EventTargetLike
-
value: Value
Returns void
listenTo
- listenTo(emitter: EventEmitterLike | EventTargetLike, listener: ((value: Value) => unknown)): void
-
Parameters
-
emitter: EventEmitterLike | EventTargetLike
-
listener: ((value: Value) => unknown)
-
- (value: Value): unknown
-
Returns unknown
Returns void
listener
- listener(listener: ((value: Value) => unknown)): ((...args: any[]) => any)
-
Parameters
-
listener: ((value: Value) => unknown)
-
- (value: Value): unknown
-
Returns unknown
Returns ((...args: any[]) => any)
-
- (...args: any[]): any
-
Returns any
Create event argments as in
emitter.emit(event.type, ...event(value))
.