mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-11 02:10:30 +00:00
16 lines
313 B
TypeScript
16 lines
313 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
|
|
);
|
|
}
|
|
}
|