I am trying to understand the namespaces and modules in TypeScript.
Please see the sample code:
namespace ModuleOne.ModuleTwo.ModuleThree{
export class SomeClass{
constructor(){};
someVariableOne:any;
someVariableTwo:any;
someFunction= function(){someFunctionCode};
};
}
But while using this SomeClass.
ModuleOne.ModuleTwo.ModuleThree.SomeClass.someFunction();
I am getting this error as:
Cannot find name 'ModuleOne'
Please let me know If I'm doing something wrong or there is some other approach that I need to follow.