summaryrefslogtreecommitdiff
path: root/deno_typescript/compiler_main.js
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-05-29 20:24:06 +1000
committerGitHub <noreply@github.com>2020-05-29 12:24:06 +0200
commit2668637e9bad75bef016e7f8a5f481b3c6221891 (patch)
tree5c3d2801e7de03e14f6896db402941dc3f2846d2 /deno_typescript/compiler_main.js
parent958f21e7abc36f0a5abaa381ed8d7f94c723f3fb (diff)
fix: REPL evaluates in strict mode (#5565)
Since everything that Deno loads is treated as an ES Module, it means that all code is treated as "use strict" except for when using the REPL. This PR changes that so code in the REPL is also always evaluated with "use strict". There are also a couple other places where we load code as scripts which should also use "use strict" just in case.
Diffstat (limited to 'deno_typescript/compiler_main.js')
-rw-r--r--deno_typescript/compiler_main.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/deno_typescript/compiler_main.js b/deno_typescript/compiler_main.js
index 31f539a27..847f3435f 100644
--- a/deno_typescript/compiler_main.js
+++ b/deno_typescript/compiler_main.js
@@ -5,6 +5,8 @@
// understood by the TypeScript language service, so it allows type safety
// checking in VSCode.
+"use strict";
+
const ASSETS = "$asset$";
/**