This repository has been archived on 2019-08-30. You can view files and clone it, but cannot push or open issues or pull requests.
SecureFileWrapper/lib/observable.d.ts

15 lines
467 B
TypeScript
Raw Normal View History

export declare type ObserverCallback<T> = (data: T) => void;
export default class Observable<T = any> {
private collect;
private collect_intervall;
private subscriber;
private events;
private timeout;
constructor(collect?: boolean, collect_intervall?: number);
getPublicApi(): {
subscribe: (callback: ObserverCallback<T[]>) => void;
unsubscribe: (callback: ObserverCallback<T[]>) => void;
};
send(data: T): void;
}