Is it possible to import a namespace for a JavaScript / CoffeeScript file?
The idea is to avoid typing out the fully qualified namespaces.
Let's say I have defined the bellow in my init code.
window.Editor = { }
And this is the CoffeeScript file in which I want to avoid having to type the fully qualified namespaces over and over again:
class Editor.Editor
constructor: (@width, @hight) ->
@canvas = new Editor.Canvas(@width, @hight)
@backGround = new Editor.BackGround(@canvas)
@frontGround = new Editor.FrontGround(@canvas)
Can I import a namespace similar to how you would import a package in Java for example
import Editor.*;