| Conditions | 2 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { FieldNotFoundError } from "Errors/Entities/FieldNotFoundError"; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Field getter |
||
| 48 | * |
||
| 49 | * @param field |
||
| 50 | * |
||
| 51 | * @throws FieldNotFoundError |
||
| 52 | */ |
||
| 53 | public get(field: string): any { |
||
| 54 | if (typeof this.props[field] === "undefined") { |
||
| 55 | throw new FieldNotFoundError(field); |
||
| 56 | } |
||
| 57 | |||
| 58 | return this.props[field]; |
||
| 59 | } |
||
| 61 |