UNPKG

@ctodev/cclibrary-typings

Version:

Library typings for use with CLARC INFINITY

34 lines (33 loc) 1.22 kB
import { TccSnackBarService } from '../../../core/services/tcc-snackbar/tcc-snackbar.service'; import { TccErrorResponse } from '../../../odata'; import { Observable } from 'rxjs'; import { TccDialogWindowService } from '../../../core/services/tcc-dialog-window/tcc-dialog-window.service'; import { TccSingleton } from '../../../core/models/tcc-singleton.model'; export declare namespace tccCatchError { interface returnType<T> { errors: { [entityKey: string]: TccErrorResponse; }; results: T[]; } interface messages { title: string; success: string; successMulti: string; errorMulti: string; partialError: string; partialErrorMulti: string; } } export declare class TccCatchErrorService implements TccSingleton { private snackBar; private dialog; private errors; constructor(snackBar: TccSnackBarService, dialog: TccDialogWindowService); init(): void; reset(): void; tccCatchError(error: TccErrorResponse): Observable<unknown>; tccForkJoin<T>(observables: { [key: string]: Observable<T>; }, messages?: tccCatchError.messages): Observable<tccCatchError.returnType<T>>; }