( details: Record<string, unknown> | undefined, )
| 134 | } |
| 135 | |
| 136 | function stripDiagnosticMeta( |
| 137 | details: Record<string, unknown> | undefined, |
| 138 | ): Record<string, unknown> | undefined { |
| 139 | if (!details) return undefined; |
| 140 | const output = { ...details }; |
| 141 | delete output.hint; |
| 142 | delete output.diagnosticId; |
| 143 | delete output.logPath; |
| 144 | return Object.keys(output).length > 0 ? output : undefined; |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * Conservative retriability policy for the Phase 2 typed-error graft. Returns |