1 | import { IDisposer } from "./utils";
|
2 | export interface IResource<T> {
|
3 | current(): T;
|
4 | dispose(): void;
|
5 | isAlive(): boolean;
|
6 | }
|
7 | export declare function fromResource<T>(subscriber: (sink: (newValue: T) => void) => void, unsubscriber?: IDisposer): IResource<T | undefined>;
|
8 | export declare function fromResource<T>(subscriber: (sink: (newValue: T) => void) => void, unsubscriber: IDisposer | undefined, initialValue: T): IResource<T>;
|