Skip to content

API Reference / @gtkx/runtime / onceSignal

Function: onceSignal() ​

onceSignal(instance, signal, handler, isAfter?): void

Defined in: packages/runtime/src/listeners.ts:106

Connects a handler that runs at most once, disconnecting itself after the first emission.

Parameters ​

instance ​

object

The object emitting the signal.

signal ​

string

The signal name to connect to.

handler ​

SignalHandler

The callback invoked on the first emission.

isAfter? ​

boolean

When true, run the handler after the default handler.

Returns ​

void