snapcap
ApiType aliases

Subscription

Type Alias: Subscription

type Subscription = () => void & {
  signal: AbortSignal;
};

Defined in: lib/typed-event-bus.ts:102

A live subscription — callable thunk that tears down when invoked, with .signal exposing the subscription's combined lifetime (fires on sub() OR on an externally-passed opts.signal abort).

Type Declaration

On this page