src/app/models/limits-result.model.ts
Properties |
Methods |
Accessors |
addError | ||||||
addError(error: string)
|
||||||
Defined in src/app/models/limits-result.model.ts:9
|
||||||
Parameters :
Returns :
void
|
errors |
errors:
|
Type : AppError[]
|
Default value : new Array<AppError>()
|
Defined in src/app/models/limits-result.model.ts:4
|
requiresMfa |
requiresMfa:
|
Type : boolean
|
Defined in src/app/models/limits-result.model.ts:5
|
isAllowed |
getisAllowed()
|
Defined in src/app/models/limits-result.model.ts:6
|
import { AppError } from './error.model';
export class LimitsResult {
errors: AppError[] = new Array<AppError>();
requiresMfa: boolean;
get isAllowed(): boolean {
return this.errors.length === 0;
}
addError(error: string): void {
this.errors.push(new AppError('Limit Exceeded', error));
}
}