* Construct a new `SourceMapConsumer` from `rawSourceMap` and `sourceMapUrl` * (see the `SourceMapConsumer` constructor for details. Then, invoke the `async * function f(SourceMapConsumer) -> T` with the newly constructed consumer, wait * for `f` to complete, call `destroy` on the consumer,
(rawSourceMap, sourceMapUrl, f)
| 65 | * ``` |
| 66 | */ |
| 67 | static async with(rawSourceMap, sourceMapUrl, f) { |
| 68 | const consumer = await new SourceMapConsumer(rawSourceMap, sourceMapUrl); |
| 69 | try { |
| 70 | return await f(consumer); |
| 71 | } finally { |
| 72 | consumer.destroy(); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Iterate over each mapping between an original source/line/column and a |