2021-01-11 12:13:41 -05:00
|
|
|
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
2021-02-04 17:18:32 -05:00
|
|
|
"use strict";
|
2020-07-19 13:49:44 -04:00
|
|
|
|
|
|
|
((window) => {
|
2020-09-16 16:22:43 -04:00
|
|
|
const core = window.Deno.core;
|
2020-07-19 13:49:44 -04:00
|
|
|
|
2020-09-12 05:53:57 -04:00
|
|
|
function opFormatDiagnostics(diagnostics) {
|
2021-04-12 15:55:05 -04:00
|
|
|
return core.opSync("op_format_diagnostic", diagnostics);
|
2020-07-19 13:49:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
function opApplySourceMap(location) {
|
2021-04-12 15:55:05 -04:00
|
|
|
const res = core.opSync("op_apply_source_map", location);
|
2020-07-19 13:49:44 -04:00
|
|
|
return {
|
|
|
|
fileName: res.fileName,
|
|
|
|
lineNumber: res.lineNumber,
|
|
|
|
columnNumber: res.columnNumber,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
window.__bootstrap.errorStack = {
|
|
|
|
opApplySourceMap,
|
|
|
|
opFormatDiagnostics,
|
|
|
|
};
|
|
|
|
})(this);
|