Skip to main content
Version: 0.17

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​

NameType
Eventextends string = string

Hierarchy​

Methods​

emit​

â–¸ emit(event, ...args): void

Parameters​

NameType
eventEvent
...argsunknown[]

Returns​

void

Defined in​

packages/@orbit/core/src/evented.ts:29


listeners​

â–¸ listeners(event): Listener[]

Parameters​

NameType
eventEvent

Returns​

Listener[]

Defined in​

packages/@orbit/core/src/evented.ts:30


off​

â–¸ off(event, listener?): void

Parameters​

NameType
eventEvent
listener?Listener

Returns​

void

Defined in​

packages/@orbit/core/src/evented.ts:27


on​

â–¸ on(event, listener): () => void

Parameters​

NameType
eventEvent
listenerListener

Returns​

fn

â–¸ (): void

Returns​

void

Defined in​

packages/@orbit/core/src/evented.ts:26


one​

â–¸ one(event, listener): () => void

Parameters​

NameType
eventEvent
listenerListener

Returns​

fn

â–¸ (): void

Returns​

void

Defined in​

packages/@orbit/core/src/evented.ts:28