type CatchResultConstructorData = { catch: boolean; display: boolean; log: boolean; error?: string; }; class CatchResult { catch: boolean; display: boolean; log: boolean; error?: string; constructor({ catch: catchErr, display: displayErr, log: logErr, error }: CatchResultConstructorData) { this.catch = catchErr; this.display = displayErr; this.log = logErr; this.error = error; } isCatched() { return this.catch; } logError() { return this.log; } displayError() { return this.display; } } export { CatchResult }; export type { CatchResultConstructorData };