( error: unknown, code: string | undefined = undefined )
| 1 | import util from 'node:util'; |
| 2 | |
| 3 | export const isErrnoException = ( |
| 4 | error: unknown, |
| 5 | code: string | undefined = undefined |
| 6 | ): error is NodeJS.ErrnoException => { |
| 7 | return ( |
| 8 | util.types.isNativeError(error) && |
| 9 | 'code' in error && |
| 10 | (code === undefined || error.code === code) |
| 11 | ); |
| 12 | }; |
| 13 | |
| 14 | interface PythonAnalysisErrorProps { |
| 15 | /** |