-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot access certain globalThis properties in .ts files #2669
Comments
TypeScript: "It's not a bug, it's a feature" 😂 |
@justjavac thanks for the posting the related issue. Looks like the workaround for now is an |
@dev-nicolaos However in TS v3.5 |
As discussed in #650 and #2368, in Deno
window === globalThis
. This can be verified by running the statement in the REPL.However, if you create a file...
and run
deno test.ts
, the tsc will throw an error, complaining that:This also prevents the ability to use things like
globalThis.fetch
,globalThis.addEventListener
, andglobalThis.onload
in .ts files, even though this should be perfectly safe in Deno given that all these things work in ordinary .js files and the REPL.Debug Info
Tested on Deno v0.12.0 running on Windows 10
The text was updated successfully, but these errors were encountered: