You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: This demonstration is a corner case and should be avoided by developers when possible. However since it's supported by TypeScript and in lack of a better solution it should be considered a "feature".
import"./types.ts";console.log(x);///Outputs 1, there is no compilation error
TypeScript is ok with this, and since you are writing a property in globalThis on import, JavaScript is as well. However deno lint will mark x as undefined.
The text was updated successfully, but these errors were encountered:
Note: This demonstration is a corner case and should be avoided by developers when possible. However since it's supported by TypeScript and in lack of a better solution it should be considered a "feature".
types.ts
mod.ts
TypeScript is ok with this, and since you are writing a property in
globalThis
on import, JavaScript is as well. However deno lint will markx
as undefined.The text was updated successfully, but these errors were encountered: