(instances: any[], error: any)
| 15 | } |
| 16 | |
| 17 | function isErrorsInstance(instances: any[], error: any): [boolean, number] { |
| 18 | for (let i = 0; i < instances.length; i++) { |
| 19 | const ins = instances[i]; |
| 20 | if (error instanceof ins) { |
| 21 | return [true, i]; |
| 22 | } |
| 23 | } |
| 24 | return [false, -1]; |
| 25 | } |
| 26 | |
| 27 | function removeNones<A>(list: (A | null)[]): A[] { |
| 28 | return list.filter((element): element is A => element !== null); |
no outgoing calls
no test coverage detected