sourceMap.findOrigin(lineNumber, columnNumber)


  • lineNumber <number> 生成的源中调用站点的 1 索引行号

    ¥lineNumber <number> The 1-indexed line number of the call site in the generated source

  • columnOffset <number> 生成源中调用站点的 1 索引列号

    ¥columnOffset <number> The 1-indexed column number of the call site in the generated source

  • 返回:<Object>

    ¥Returns: <Object>

给定生成源中调用站点的 1 索引行号和列号,在原始源中查找相应的调用站点位置。

¥Given a 1-indexed lineNumber and columnNumber from a call site in the generated source, find the corresponding call site location in the original source.

如果在任何源映射中都找不到提供的行号和列号,则返回空对象。否则,返回的对象包含以下键:

¥If the lineNumber and columnNumber provided are not found in any source map, then an empty object is returned. Otherwise, the returned object contains the following keys:

  • 名称:<string> | <undefined> 源映射中范围的名称(如果提供)

    ¥name: <string> | <undefined> The name of the range in the source map, if one was provided

  • 文件名:<string> 原始源的文件名,如 SourceMap 中报告的那样

    ¥fileName: <string> The file name of the original source, as reported in the SourceMap

  • 调用号码:<number> 原始源中相应调用站点的 1 索引行编号

    ¥lineNumber: <number> The 1-indexed lineNumber of the corresponding call site in the original source

  • 栏目编号:<number> 原始源中相应调用站点的 1 索引列编号

    ¥columnNumber: <number> The 1-indexed columnNumber of the corresponding call site in the original source

Node.js 中文网 - 粤ICP备13048890号