In C# I can do this:
using IAnyType = App.Namespace.Types.IAnyType ;
class BaseClass : IAnyType { }
Is there a Typescript equivalent?
I too am annoyed that you can't alias things the way you might expect. What I've done is ended up using abbreviated 'namespaces' to keep things short.
import RSV = module("views/researchSectionView")
var r = new RSV.ResearchSectionView();
I actually prefer your original solution over the alternatives:
import Interfaces = App.Widgets.Interfaces;
class BaseDialog implements Interfaces.IDialogOptions { }
Without having the alias (Interfaces
) you could get naming collisions - which if you have ever had to handle with using
statements is a real pain as you end up using an alias or using the full namespace.
using myAlias = App.Namespace.Types;
At least having an alias for all modules you import means this won't be an issue.