import { Observable } from 'rxjs'; import { TaskInterface } from './definitions'; export declare class CancelableTask implements TaskInterface { private operation; private _canceled; private _executed; private _subject; get isCanceled(): boolean; constructor(operation: () => Observable); /** * If canceled is called before the execute => do nothing * otherwise reject pending request * If canceled is called more than once, do nothing */ cancel(withError?: Error): void; /** * If execute is called after cancel => return Operation cancelled exception * If already executing, return the current execution promise */ execute(): Observable; toObservable(): Observable; }