summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--globals.ts4
-rw-r--r--runtime.ts2
-rw-r--r--util.ts2
-rw-r--r--v8_source_maps.ts8
4 files changed, 8 insertions, 8 deletions
diff --git a/globals.ts b/globals.ts
index b8944b4be..896c2a0eb 100644
--- a/globals.ts
+++ b/globals.ts
@@ -31,13 +31,13 @@ _global["console"] = {
// tslint:disable-next-line:no-any
error(...args: any[]): void {
- print("ERROR: " + stringifyArgs(args));
+ print(`ERROR: ${stringifyArgs(args)}`);
},
// tslint:disable-next-line:no-any
assert(condition: boolean, ...args: any[]): void {
if (!condition) {
- throw new Error("Assertion failed: " + stringifyArgs(args));
+ throw new Error(`Assertion failed: ${stringifyArgs(args)}`);
}
}
};
diff --git a/runtime.ts b/runtime.ts
index 8929b7112..46538c80f 100644
--- a/runtime.ts
+++ b/runtime.ts
@@ -181,7 +181,7 @@ function resolveModuleName(
function execute(fileName: string, outputCode: string): void {
util.assert(outputCode && outputCode.length > 0);
_global["define"] = makeDefine(fileName);
- outputCode += "\n//# sourceURL=" + fileName;
+ outputCode += `\n//# sourceURL=${fileName}`;
globalEval(outputCode);
_global["define"] = null;
}
diff --git a/util.ts b/util.ts
index 7ac7b155c..70cb79a55 100644
--- a/util.ts
+++ b/util.ts
@@ -14,7 +14,7 @@ export function log(...args: any[]): void {
export function assert(cond: boolean, msg = "") {
if (!cond) {
- throw Error("Assert fail. " + msg);
+ throw Error(`Assert fail. ${msg}`);
}
}
diff --git a/v8_source_maps.ts b/v8_source_maps.ts
index 7209e192c..0b7fc4e86 100644
--- a/v8_source_maps.ts
+++ b/v8_source_maps.ts
@@ -53,7 +53,7 @@ export function prepareStackTraceWrapper(
export function prepareStackTrace(error: Error, stack: CallSite[]): string {
const frames = stack.map(
- (frame: CallSite) => "\n at " + wrapCallSite(frame).toString()
+ (frame: CallSite) => `\n at ${wrapCallSite(frame).toString()}`
);
return error.toString() + frames.join("");
}
@@ -162,7 +162,7 @@ function CallSiteToString(frame: CallSite): string {
functionName.indexOf("." + methodName) !==
functionName.length - methodName.length - 1
) {
- line += " [as " + methodName + "]";
+ line += ` [as ${ methodName} ]`;
}
} else {
line += typeName + "." + (methodName || "<anonymous>");
@@ -176,7 +176,7 @@ function CallSiteToString(frame: CallSite): string {
addSuffix = false;
}
if (addSuffix) {
- line += " (" + fileLocation + ")";
+ line += ` (${fileLocation})`;
}
return line;
}
@@ -265,7 +265,7 @@ function mapEvalOrigin(origin: string): string {
// Parse nested eval() calls using recursion
match = /^eval at ([^(]+) \((.+)\)$/.exec(origin);
if (match) {
- return "eval at " + match[1] + " (" + mapEvalOrigin(match[2]) + ")";
+ return `eval at ${match[1]} (${mapEvalOrigin(match[2])})`;
}
// Make sure we still return useful information if we didn't find anything