Connection
The link between a Signal and a handler: disconnect it to stop the handler.
- Get it:
Signal.connectandSignal.oncereturn one
Properties
Section titled “Properties”connected
Section titled “connected”Type: boolean · Access: read-only
True until the connection is disconnected, or until a once handler has run.
Methods
Section titled “Methods”disconnect
Section titled “disconnect”disconnect(): voidStops the handler. Calling it again does nothing.
Examples
Section titled “Examples”Listen for a while
Section titled “Listen for a while”import { RunService, task } from '@rally/sdk';
let frames = 0;const counter = RunService.heartbeat.connect(() => frames++);task.delay(5, () => counter.disconnect());