Skip to content

Documentation


Documentation / @blazetrails/activesupport / Notifications

Class: Notifications ​

Defined in: packages/activesupport/lib/notifications.ts:29

Constructors ​

Constructor ​

new Notifications(): Notifications

Returns ​

Notifications

Accessors ​

instrumenter ​

Get Signature ​

get static instrumenter(): Instrumenter

Defined in: packages/activesupport/lib/notifications.ts:171

Returns ​

Instrumenter


notifier ​

Get Signature ​

get static notifier(): Fanout

Defined in: packages/activesupport/lib/notifications.ts:32

Returns ​

Fanout

Set Signature ​

set static notifier(notifier): void

Defined in: packages/activesupport/lib/notifications.ts:36

Parameters ​
ParameterType
notifierFanout
Returns ​

void

Methods ​

buildHandle() ​

static buildHandle(name, payload?): NotificationHandle

Defined in: packages/activesupport/lib/notifications.ts:167

Parameters ​

ParameterType
namestring
payloadEventPayload

Returns ​

NotificationHandle


instrument() ​

static instrument<T>(name, payload?, block?): T extends undefined ? void : T

Defined in: packages/activesupport/lib/notifications.ts:148

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
namestring
payloadEventPayload
block?(payload) => T

Returns ​

T extends undefined ? void : T


monotonicSubscribe() ​

Call Signature ​

static monotonicSubscribe(callback): Evented

Defined in: packages/activesupport/lib/notifications.ts:64

Parameters ​
ParameterType
callbackNotificationCallback
Returns ​

Evented

Call Signature ​

static monotonicSubscribe(pattern, callback): Evented

Defined in: packages/activesupport/lib/notifications.ts:65

Parameters ​
ParameterType
patternstring | RegExp | null | undefined
callbackNotificationCallback
Returns ​

Evented


publish() ​

static publish(name, ...args): void

Defined in: packages/activesupport/lib/notifications.ts:159

Parameters ​

ParameterType
namestring
...argsunknown[]

Returns ​

void


publishEvent() ​

static publishEvent(event): void

Defined in: packages/activesupport/lib/notifications.ts:163

Parameters ​

ParameterType
eventNotificationEvent

Returns ​

void


subscribe() ​

Call Signature ​

static subscribe(pattern, callback): Evented

Defined in: packages/activesupport/lib/notifications.ts:48

Parameters ​
ParameterType
patternstring | RegExp | null | undefined
callback(event) => void
Returns ​

Evented

Call Signature ​

static subscribe(pattern, callback): Evented

Defined in: packages/activesupport/lib/notifications.ts:52

Parameters ​
ParameterType
patternstring | RegExp | null | undefined
callbackEventedListener | NotificationCallback
Returns ​

Evented


subscribed() ​

Call Signature ​

static subscribed<T>(...args): Promise<T>

Defined in: packages/activesupport/lib/notifications.ts:90

Type Parameters ​
Type Parameter
T
Parameters ​
ParameterType
...args[NotificationCallback, () => T | Promise<T>, { monotonic?: boolean; }]
Returns ​

Promise<T>

Call Signature ​

static subscribed<T>(callback, pattern, block, options?): Promise<T>

Defined in: packages/activesupport/lib/notifications.ts:97

Type Parameters ​
Type Parameter
T
Parameters ​
ParameterType
callbackNotificationCallback
patternstring | RegExp | null | undefined
block() => T | Promise<T>
options?{ monotonic?: boolean; }
options.monotonic?boolean
Returns ​

Promise<T>


subscribeOnce() ​

static subscribeOnce(pattern, callback): Evented

Defined in: packages/activesupport/lib/notifications.ts:129

Parameters ​

ParameterType
patternstring | RegExp | null | undefined
callback(event) => void

Returns ​

Evented


unsubscribe() ​

static unsubscribe(subscriberOrName): void

Defined in: packages/activesupport/lib/notifications.ts:140

Parameters ​

ParameterType
subscriberOrNamestring | Evented<Delegate> | null

Returns ​

void


unsubscribeAll() ​

static unsubscribeAll(): void

Defined in: packages/activesupport/lib/notifications.ts:144

Returns ​

void