@opra/common
Version:
Opra common package
19 lines (18 loc) • 621 B
TypeScript
import { OpraDocumentError } from './opra-document-error.js';
export declare namespace DocumentInitContext {
interface Options {
maxErrors?: number;
scopes?: string | string[];
}
}
export declare class DocumentInitContext {
path: string;
error: OpraDocumentError;
maxErrors: number;
showErrorDetails: boolean;
constructor(options?: DocumentInitContext.Options);
addError(error: Error | OpraDocumentError.ErrorDetail | string): void;
enter(path: string, fn: () => any): any;
enterAsync(path: string, fn: () => any): Promise<any>;
extend<T>(args: T): this & T;
}