imsc
Version:
Renders IMSC documents to HTML5 fragments
35 lines • 1.27 kB
TypeScript
/**
* @module imscError
*/
/**
* @param {ErrorHandler} errorHandler
* @param {string} msg
*/
export function reportWarning(errorHandler: ErrorHandler, msg: string): void;
/**
* @param {ErrorHandler} errorHandler
* @param {string} msg
*/
export function reportError(errorHandler: ErrorHandler, msg: string): void;
/**
* @param {ErrorHandler} errorHandler
* @param {string} msg
*/
export function reportFatal(errorHandler: ErrorHandler, msg: string): void;
/**
* Generic interface for handling events. The interface exposes four
* methods:
* - <pre>info</pre>: unusual event that does not result in an inconsistent state
* - <pre>warn</pre>: unexpected event that should not result in an inconsistent state
* - <pre>error</pre>: unexpected event that may result in an inconsistent state
* - <pre>fatal</pre>: unexpected event that results in an inconsistent state
* and termination of processing
* Each method takes a single <pre>string</pre> describing the event as argument,
* and returns a single <pre>boolean</pre>, which terminates processing if <pre>true</pre>.
*/
export type ErrorHandler = {
warn: (msg: string) => boolean;
error: (msg: string) => boolean;
fatal: (msg: string) => boolean;
};
//# sourceMappingURL=error.d.ts.map