How can I efficiently utilize classes from a namespace that may be the same or different from the current file's namespace?
I currently have the following two files.
TypeA.ts:
export namespace Game {
@ccclass
export class TypeA extends cc.Component {
protected onLoad(): void {
// do something
}
}}
TypeB.ts:
import * s from "some url";
export namespace Game {
@ccclass
export class TypeB extends s.Game.TypeA {
protected onLoad(): void {
// do something
}
}}
In the import section, Visual Studio Code is expecting 'as' but I am able to enter any string and it still works. Additionally, the extension of TypeB looks messy and lengthy due to the nested namespaces.
Is there a way to simplify the syntax to just have TypeB extend TypeA since both are within the same namespace? I have many other classes/components planned to be placed under the same namespace - should I proceed with this approach or remove the export namespace part for easier accessibility?