Skip to content

Connection

The link between a Signal and a handler: disconnect it to stop the handler.

Type: boolean · Access: read-only

True until the connection is disconnected, or until a once handler has run.

disconnect(): void

Stops the handler. Calling it again does nothing.

import { RunService, task } from '@rally/sdk';
let frames = 0;
const counter = RunService.heartbeat.connect(() => frames++);
task.delay(5, () => counter.disconnect());