Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SourceMapDecoder

Provides a utility to decode a coordinate in a source file into the enclosing function name.

Hierarchy

  • SourceMapDecoder

Index

Constructors

Methods

Constructors

constructor

Methods

decode

  • decode(source: string, line: number, column: number): string | null
  • Returns the enclosing function name for the input coordinate. If the input coordinate is not enclosed in a function then null is returned.

    throws

    if source is not present in the source map

    Parameters

    • source: string

      the source file in which the search should happen

    • line: number

      zero-based line number of the coordinate

    • column: number

      zero-based column number of the coordinate

    Returns string | null

Generated using TypeDoc