-
Notifications
You must be signed in to change notification settings - Fork 62
Modules being emitted in strict mode breaks global.ts #100
Comments
@jason0x43 mentioned the following should work in strict mode: const global = (1,eval)('this'); |
Actually, I settled on |
I was thinking something along those lines too; is there a reason to prefer that over |
|
Oh, derp, that is what we were doing (I had thought we were doing something more specific). Nevermind. Though I wouldn't have expected |
Yeah, I didn't either, but @DanielRosenwasser pointed me to a StackOverflow and it passes the tests. |
Functions created with the |
As of TypeScript 1.8, all modules are emitted with the
"use strict";
prologue (see: microsoft/TypeScript#5765). This causesglobal.ts
to returnundefined
at runtime, versus the global scope.The text was updated successfully, but these errors were encountered: