Interface: Evented<Event>
A class decorated as @evented
should also implement the Evented
interface.
import { evented, Evented } from '@orbit/core';
@evented
class Source implements Evented {
// ... Evented implementation
}
Type parameters​
Name | Type |
---|---|
Event | extends string = string |
Hierarchy​
Methods​
emit​
â–¸ emit(event
, ...args
): void
Parameters​
Name | Type |
---|---|
event | Event |
...args | unknown [] |
Returns​
void
Defined in​
packages/@orbit/core/src/evented.ts:29
listeners​
â–¸ listeners(event
): Listener
[]
Parameters​
Name | Type |
---|---|
event | Event |
Returns​
Listener
[]
Defined in​
packages/@orbit/core/src/evented.ts:30
off​
â–¸ off(event
, listener?
): void
Parameters​
Name | Type |
---|---|
event | Event |
listener? | Listener |
Returns​
void
Defined in​
packages/@orbit/core/src/evented.ts:27
on​
â–¸ on(event
, listener
): () => void
Parameters​
Name | Type |
---|---|
event | Event |
listener | Listener |
Returns​
fn
â–¸ (): void
Returns​
void
Defined in​
packages/@orbit/core/src/evented.ts:26
one​
â–¸ one(event
, listener
): () => void
Parameters​
Name | Type |
---|---|
event | Event |
listener | Listener |
Returns​
fn
â–¸ (): void
Returns​
void