Type guard for Node.js-style errors with a `code` property.
(value: unknown)
| 62 | |
| 63 | /** Type guard for Node.js-style errors with a `code` property. */ |
| 64 | function isNodeError(value: unknown): value is NodeError { |
| 65 | return value instanceof Error && 'code' in value; |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Maps raw errors to PMXT unified error classes |