#Is there a better way to make global variables?

9 messages · Page 1 of 1 (latest)

sterile cedar
#

Why not use global?

dense furnace
#

Have you even tried to look for the error you get before asking?

deep haven
#

its typescript issue actually

#

you inline one file into another

sterile cedar
#

Well, this is how I use it:

global.demo = 'This can be anything'
console.log(global.demo)
#

I just know it works shrug

#

Feel free to experiment if needed.

deep haven
#

you just add property to global object

sterile cedar
#

Last I use global, was to set options depending on the OS.