.ts
file, you can create the following things at top level:
class
interface
enum
type
Hello
and World
in two different files. But the question remains, how is Hello
able to refer to World
? Where’s the import statement? How do you even import?
That’s the neat part, you don’t!
In metz you don’t have to deal with importing anything, because everything is made available in the global namespace.
Every class, interface, type, enum that you create in a file is made available for you to use in all your other files.