tsconfig.json
:
...
"module": "none"
...
file1.ts
:
namespace Myns {
type Mytype = number
}
file2.ts
:
namespace Myns {
let x: Mytype
^^^^^^ Error - unable to locate declaration in file1.ts
}
Why am I encountering an error when trying to use Mytype
inside file2.ts
without exporting it in file1.ts
? I prefer not to export it. This issue arises with TS version 3.8.