How to initialize global variable so it can be accessed without globalThis?
I'm hacking on a large existing codebase using Deno. This codebase uses a number of global variables like this:
if( __DEV__ && ... )
if( __DEV__ && ... )
Their build system sets these values at build time I think. I am trying to hack around without building, but I am stuck because I haven't figured out how to initialize these variables globally. I always get an error of "ReferenceError DEV is not defined".
The code I'm working with uses ESM modules and TypeScript. There is a global.d.ts that sets