Trying to reorganize some code that was mistakenly namespaced and move it to its own namespace without affecting the current functionality during the process.
The original code is structured as follows:
// (org)
module General.Admin.Dialogs {
export class LoginDialog {
// details
}
}
Post transition, the code should look like this:
// (new)
namespace Admin {
export module Dialogs{
export class Login {
}
}
}
However, I need to maintain some of the existing functionality by using aliases for objects in a specific namespace/module. The TypeScript 2.3 compiler presents an issue with naming collisions because it assumes the current root namespace due to lack of specification:
namespace Admin {
export module Dialogs{
export class Login {
}
}
}
module General.Admin.Dialogs {
export var LoginDialog = Admin.Dialogs.Login;
}
The compiler interprets Admin.Dialogs.Login
to be part of the old General
module/namespace rather than the newly declared Admin.Dialogs
. Is there a workaround to resolve this issue?