Declaring a single type - "using" equivalent for single type
typescript
Solution
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.
Problem
In C# I can do this: ``` using IAnyType = App.Namespace.Types.IAnyType ; class BaseClass : IAnyType { } ``` Is there a Typescript equivalent? ``` //BAD: import IDialogOptions = App.Widgets.Interfaces.IDialogOptions; //A module cannot be aliased as a non-module type class BaseClass implements IDialogOptions { } //BAD: declare var IDialogOptions: App.Widgets.Interfaces.IDialogOptions; class BaseClass implements IDialogOptions { } //The name IDialogOptions does not exist in the current context ``` The closest I can get is: ``` import Interfaces = App.Widgets.Interfaces; class BaseDialog implements Interfaces.IDialogOptions { } ``` It's not ideal to use this long name every time I need to use this interface. I guess it's not all the bad but I was wondering if there's a better?