Skip to main content
The Deno 2 Release Candidate is here
Learn more
Latest
method SourceMapConsumer.prototype.allGeneratedPositionsFor
import { SourceMapConsumer } from "https://deno.land/x/source_map@0.8.0-beta.1/mod.js";

Returns all generated line and column information for the original source, line, and column provided. If no column is provided, returns all mappings corresponding to a either the line we are searching for or the next closest line that has any mappings. Otherwise, returns all mappings corresponding to the given line and either the column we are searching for or the next closest column that has any offsets.

The only argument is an object with the following properties:

  • source: The filename of the original source.
  • line: The line number in the original source. The line number is 1-based.
  • column: Optional. the column number in the original source. The column number is 0-based.

and an array of objects is returned, each with the following properties:

  • line: The line number in the generated source, or null. The line number is 1-based.
  • column: The column number in the generated source, or null. The column number is 0-based.