@mmuscat/angular-error-boundary
Version:
Error Boundaries for Angular, with a bit of Suspense.
24 lines (23 loc) • 1.16 kB
TypeScript
import { ChangeDetectorRef, DoCheck, ErrorHandler, QueryList, TemplateRef, EventEmitter, AfterViewInit } from "@angular/core";
import { NgIfContext } from "@angular/common";
import * as i0 from "@angular/core";
export declare class ErrorLogger {
error(error: unknown): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorLogger, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorLogger>;
}
export declare class ErrorBoundary implements DoCheck, AfterViewInit {
changeDetectorRef: ChangeDetectorRef;
logger: ErrorLogger;
private errorHandler;
error: EventEmitter<ErrorEvent>;
hasError: boolean;
template?: QueryList<TemplateRef<NgIfContext<boolean>>>;
ngDoCheck(): void;
ngAfterViewInit(): void;
handleError(fault: unknown): void;
retry(): void;
constructor(changeDetectorRef: ChangeDetectorRef, logger: ErrorLogger, errorHandler: ErrorHandler);
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorBoundary, [null, null, { skipSelf: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<ErrorBoundary, "error-boundary", never, {}, { "error": "error"; }, ["template"], ["fallback, [fallback]"]>;
}