UNPKG

@coursebuilder/core

Version:

Core package for Course Builder

25 lines (23 loc) 923 B
type ErrorOptions = Error | Record<string, unknown>; type ErrorType = 'AdapterError' | 'UnknownAction' | 'UnsupportedStrategy' | 'MissingAdapter' | 'MissingAdapterMethods'; declare class CourseBuilderError extends Error { /** The error type. Used to identify the error in the logs. */ type: ErrorType; cause?: Record<string, unknown> & { err?: Error; }; constructor(message?: string | Error | ErrorOptions, errorOptions?: ErrorOptions); } declare class AdapterError extends CourseBuilderError { static type: string; } declare class UnsupportedStrategy extends CourseBuilderError { static type: string; } declare class MissingAdapter extends CourseBuilderError { static type: string; } declare class MissingAdapterMethods extends CourseBuilderError { static type: string; } export { AdapterError, CourseBuilderError, MissingAdapter, MissingAdapterMethods, UnsupportedStrategy };