@tanstack/query-core
Version:
The framework agnostic core that powers TanStack Query
12 lines (10 loc) • 333 B
text/typescript
type Listener = () => void;
declare class Subscribable<TListener extends Function = Listener> {
protected listeners: Set<TListener>;
constructor();
subscribe(listener: TListener): () => void;
hasListeners(): boolean;
protected onSubscribe(): void;
protected onUnsubscribe(): void;
}
export { Subscribable };