mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
docs(cli/dts): fix Deno.applySourceMap
example (#10602)
This commit is contained in:
parent
1cd1419e18
commit
7211c7cf8f
1 changed files with 4 additions and 3 deletions
7
cli/dts/lib.deno.unstable.d.ts
vendored
7
cli/dts/lib.deno.unstable.d.ts
vendored
|
@ -526,18 +526,19 @@ declare namespace Deno {
|
|||
* uncaught error is logged. This function can be used to perform the lookup
|
||||
* for creating better error handling.
|
||||
*
|
||||
* **Note:** `line` and `column` are 1 indexed, which matches display
|
||||
* **Note:** `lineNumber` and `columnNumber` are 1 indexed, which matches display
|
||||
* expectations, but is not typical of most index numbers in Deno.
|
||||
*
|
||||
* An example:
|
||||
*
|
||||
* ```ts
|
||||
* const orig = Deno.applySourceMap({
|
||||
* const origin = Deno.applySourceMap({
|
||||
* fileName: "file://my/module.ts",
|
||||
* lineNumber: 5,
|
||||
* columnNumber: 15
|
||||
* });
|
||||
* console.log(`${orig.filename}:${orig.line}:${orig.column}`);
|
||||
*
|
||||
* console.log(`${origin.fileName}:${origin.lineNumber}:${origin.columnNumber}`);
|
||||
* ```
|
||||
*/
|
||||
export function applySourceMap(location: Location): Location;
|
||||
|
|
Loading…
Reference in a new issue