summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/diagnostics.rs1
-rw-r--r--cli/dts/lib.deno.unstable.d.ts39
-rw-r--r--cli/tests/unit/error_stack_test.ts16
3 files changed, 1 insertions, 55 deletions
diff --git a/cli/diagnostics.rs b/cli/diagnostics.rs
index 24d7ab0e7..1538e5d4d 100644
--- a/cli/diagnostics.rs
+++ b/cli/diagnostics.rs
@@ -39,7 +39,6 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[
"UnixConnectOptions",
"UnixListenOptions",
"addSignalListener",
- "applySourceMap",
"bench",
"connect",
"consoleSize",
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index 2904c14f3..fbbe165f9 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -895,45 +895,6 @@ declare namespace Deno {
options?: EmitOptions,
): Promise<EmitResult>;
- /** **UNSTABLE**: Should not have same name as `window.location` type. */
- interface Location {
- /** The full url for the module, e.g. `file://some/file.ts` or
- * `https://some/file.ts`. */
- fileName: string;
- /** The line number in the file. It is assumed to be 1-indexed. */
- lineNumber: number;
- /** The column number in the file. It is assumed to be 1-indexed. */
- columnNumber: number;
- }
-
- /** **UNSTABLE**: new API, yet to be vetted.
- *
- * Given a current location in a module, lookup the source location and return
- * it.
- *
- * When Deno transpiles code, it keep source maps of the transpiled code. This
- * function can be used to lookup the original location. This is
- * automatically done when accessing the `.stack` of an error, or when an
- * uncaught error is logged. This function can be used to perform the lookup
- * for creating better error handling.
- *
- * **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 origin = Deno.applySourceMap({
- * fileName: "file://my/module.ts",
- * lineNumber: 5,
- * columnNumber: 15
- * });
- *
- * console.log(`${origin.fileName}:${origin.lineNumber}:${origin.columnNumber}`);
- * ```
- */
- export function applySourceMap(location: Location): Location;
-
export type SetRawOptions = {
cbreak: boolean;
};
diff --git a/cli/tests/unit/error_stack_test.ts b/cli/tests/unit/error_stack_test.ts
index e8d29569f..8444972a8 100644
--- a/cli/tests/unit/error_stack_test.ts
+++ b/cli/tests/unit/error_stack_test.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
-import { assert, assertEquals, assertMatch } from "./test_util.ts";
+import { assertEquals, assertMatch } from "./test_util.ts";
Deno.test(function errorStackMessageLine() {
const e1 = new Error();
@@ -52,17 +52,3 @@ Deno.test(function captureStackTrace() {
}
foo();
});
-
-// FIXME(bartlomieju): no longer works after migrating
-// to JavaScript runtime code
-Deno.test({ ignore: true }, function applySourceMap() {
- const result = Deno.applySourceMap({
- fileName: "CLI_SNAPSHOT.js",
- lineNumber: 23,
- columnNumber: 0,
- });
- Deno.core.print(`result: ${result}`, true);
- assert(result.fileName.endsWith(".ts"));
- assert(result.lineNumber != null);
- assert(result.columnNumber != null);
-});