(obj: unknown)
| 7 | this.str = str; |
| 8 | } |
| 9 | check(obj: unknown): void { |
| 10 | if (this.str === undefined) { |
| 11 | if (typeof obj !== "string") throw new Error(`${obj} is not a string`); |
| 12 | } else if (this.str instanceof RegExp) { |
| 13 | if (typeof obj !== "string") throw new Error(`${obj} is not a string`); |
| 14 | if (!obj.match(this.str)) throw new Error(`${obj} does not match ${this.str}`); |
| 15 | } else if (this.str !== obj) throw new Error(`${obj} does not match ${this.str}`); |
| 16 | } |
| 17 | } |
nothing calls this directly
no outgoing calls
no test coverage detected