(map)
| 21 | * @todo This should be deleted, as it's exclusively to make TypeScript happy. |
| 22 | */ |
| 23 | export function toTerserMap (map) { |
| 24 | if (typeof map === 'string') map = JSON.parse(map); |
| 25 | return typeof map === 'object' && map ? { |
| 26 | ...map, |
| 27 | version: String(map.version) |
| 28 | } : null; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Convert a Terser-style SourceMap to Babel-style, parsing if necessary. |