Content foo.ts:
let a: Person = new Person();
Content bar.ts:
class Person {}
The tsconfig.json file contains the set of default values ββcreated tsc --init.
I am using typescript version 2.6.2.
The above code simply compiles without errors in regards Personthat are not defined. If I rename Personto Personsfoo.ts, then it causes an error saying cannot find name 'Persons'. Thus, it seems to automatically import this file.
Also note that I do not export the class Personto bar.ts. If I add an export statement, then everything will behave as it should - I get an error message cannot find name 'Person'.
Does anyone know what is going on here? Is this a user error?
Edit:
, , node.js. typescript, ?