( value: Record<string, unknown>, path: string[], )
| 171 | } |
| 172 | |
| 173 | function normalizeDebugStackFrame( |
| 174 | value: Record<string, unknown>, |
| 175 | path: string[], |
| 176 | ): Record<string, unknown> { |
| 177 | if ( |
| 178 | !path.includes('threads') || |
| 179 | !path.includes('frames') || |
| 180 | typeof value.index !== 'number' || |
| 181 | typeof value.symbol !== 'string' || |
| 182 | typeof value.displayLocation !== 'string' || |
| 183 | !isSystemDebugStackLocation(value.displayLocation) |
| 184 | ) { |
| 185 | return value; |
| 186 | } |
| 187 | |
| 188 | return { |
| 189 | ...value, |
| 190 | symbol: '<FUNC>', |
| 191 | displayLocation: normalizeDebugStackDisplayLocation(value.displayLocation), |
| 192 | }; |
| 193 | } |
| 194 | |
| 195 | function isDebugStackFrameRecord( |
| 196 | value: unknown, |
no test coverage detected