(obj: unknown)
| 11 | } |
| 12 | } |
| 13 | check(obj: unknown) { |
| 14 | if (!(obj instanceof Array)) throw new Error(`${obj} is not of type array`); |
| 15 | if (this.arr instanceof Array) { |
| 16 | if (this.arr.length !== obj.length) throw new Error(`${obj} does not match array schema`); |
| 17 | for (let i = 0; i < obj.length; i++) { |
| 18 | this.arr[i].check(obj[i]); |
| 19 | } |
| 20 | } else { |
| 21 | for (const elm of obj) { |
| 22 | this.arr.check(elm); |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | } |
nothing calls this directly
no outgoing calls
no test coverage detected