I've defined a class inside a module and exported it as default, like this:
// file: Component.ts
import UIComponent from "path/to/UIComponent";
namespace typescript.example.app
{
export class Component extends UIComponent
{
...
}
}
export default typescript.example.app.Component;
In another file, unless I want to use the Component class at runtime (create an instance or call a static method), I don't need to import it.
// file: UseComponent.ts
namespace typescript.example.app
{
export class UseComponent
{
...
// error: namespace typescript.example.app has no exported member Component
public myMethod(component: typescript.example.app.Component) { ... }
...
}
}
export default typescript.example.app.UseComponent;
How can I make typescript.example.app.Component
globally visible with it being declared inside a module?