()
| 4 | ] |
| 5 | |
| 6 | function suppressErrorOutput() { |
| 7 | const originalError = console.error |
| 8 | |
| 9 | const error = (...args: Parameters<typeof originalError>) => { |
| 10 | const message = typeof args[0] === 'string' ? args[0] : null |
| 11 | if (!message || !consoleFilters.some((filter) => filter.test(message))) { |
| 12 | originalError(...args) |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | console.error = error |
| 17 | |
| 18 | return () => { |
| 19 | console.error = originalError |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | function errorFilteringDisabled() { |
| 24 | try { |
no outgoing calls
no test coverage detected
searching dependent graphs…