When you add instructions importto your Typescript file, this file is considered an external module. So this is not a problem:
File.1.ts
import { Type } from '...';
let whatever = 123;
...
File.2.ts
import { Type } from '...';
let whatever = 234;
...
So it works. But at the moment when these two statements are deleted import, these files are no longer considered modules, and both variables with the same name become global, interfering with each other.
Question
How to force modulate a source file that does not have any import statements?
source
share