OSSecureFileWrapper/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;
}