Backplane.CDP.MCP.SourceMap (backplane_cdp v1.10.112)

Copy Markdown

Resolves original source coordinates through bounded version 3 source maps.

Coordinates in the public API are one-based. An explicit source column uses the closest preceding mapping on that source line. An omitted column selects the first mapped column on the line. Embedded indexed sections are supported.

Summary

Types

resolution()

@type resolution() ::
  :no_source
  | {:ok, %{url: String.t(), line: pos_integer(), column: pos_integer()}}
  | {:error, String.t()}

Functions

resolve(map_json, map_url, requested_url, line, column)

@spec resolve(
  map() | String.t(),
  String.t(),
  String.t(),
  pos_integer(),
  pos_integer() | nil
) ::
  resolution()