@spartacus/core
Version:
Spartacus - the core framework
23 lines (22 loc) • 806 B
TypeScript
import { OnDestroy } from '@angular/core';
import { Observable, Subscription } from 'rxjs';
import * as i0 from "@angular/core";
export declare abstract class Command<P = undefined, R = unknown> {
abstract execute(params: P): Observable<R>;
}
export declare enum CommandStrategy {
Parallel = 0,
Queue = 1,
CancelPrevious = 2,
ErrorPrevious = 3
}
export declare class CommandService implements OnDestroy {
protected subscriptions: Subscription;
constructor();
create<P = undefined, R = unknown>(commandFactory: (command: P) => Observable<any>, options?: {
strategy?: CommandStrategy;
}): Command<P, R>;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<CommandService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<CommandService>;
}