import { Observable } from 'rxjs'; import { TDMModel } from '@tdm/core/tdm'; import { ResourceControl } from '@tdm/data'; /** * * ## Observables and `ActiveRecordState` * `ActiveRecordState` notification mechanism is based on observables. * This is great for UI interfaces but requires implementing tear down logic, that is unsubscribing * from stream. To help with that, all of the streams in `ActiveRecordState` are shared & lazy, they will only * register if accessed to and automatically disconnect when the number of subscribers is 0. * * You can also call `ActiveRecordState.disconnect()` to clear all subscriptions. * * When using an observable aware UI framework subscriptions managed by the framework so as long as * you don't manually subscribe you are safe. e.g: In Angular using the `async` pipe (`|`) will also * unsubscribe when the component get disposed. */ export declare class RxResourceControl extends ResourceControl { /** * An observable that emits a value every time the busy state changes. */ busy$: Observable; /** * An observable that emits the resource (hence self) on every ActionSuccess event. * If self is ActiveRecordCollection it will emit the collection property. */ self$: Observable & T>; private _busySubject; private _selfSubject; /** * Disconnect all rx subscriptions */ disconnect(): void; private static _rx; } export declare function init(): void;