diff options
author | Francesco Borzì <borzifrancesco@gmail.com> | 2018-08-25 21:42:49 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-08-25 15:42:49 -0400 |
commit | 84c38f34eeb2a6f9f6786aba0f5da5eb9efa422b (patch) | |
tree | 5fb5ebec425e2736d08f6043405931109da0f7b9 /js/global-eval.ts | |
parent | 3bcf7e271f775002ba9c010ad79e321a3888187d (diff) |
Prevent circular imports in ts code (#576)
Diffstat (limited to 'js/global-eval.ts')
-rw-r--r-- | js/global-eval.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/global-eval.ts b/js/global-eval.ts new file mode 100644 index 000000000..ee37e6f24 --- /dev/null +++ b/js/global-eval.ts @@ -0,0 +1,6 @@ +// If you use the eval function indirectly, by invoking it via a reference +// other than eval, as of ECMAScript 5 it works in the global scope rather than +// the local scope. This means, for instance, that function declarations create +// global functions, and that the code being evaluated doesn't have access to +// local variables within the scope where it's being called. +export const globalEval = eval; |