mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
15 lines
308 B
TypeScript
15 lines
308 B
TypeScript
import ServiceError from './ServiceError';
|
|
|
|
|
|
export default class ServiceErrors {
|
|
errors: ServiceError[];
|
|
|
|
constructor(errors: ServiceError[]) {
|
|
this.errors = errors;
|
|
}
|
|
|
|
hasType(errorType: string) {
|
|
return this.errors
|
|
.some((error: ServiceError) => error.errorType === errorType);
|
|
}
|
|
} |