I have a TypeScript class file:
class SomeClass {
public load(): void {
console.log('loaded');
}
}
And another ts file, which are mostly functions, that wants to use this class:
// declare it
declare var SomeClass;
function useIt() {
const c = new SomeClass();
c.load();
}
In Visual Studio 2019, it tells me that SomeClass is duplicate (e.g. at the declare var SomeClass line). Still generates the .js, but there is also an error.
So I understand that it's a duplicate declaration, so with that in mind, how do I tell VS to compile the .ts files in isolation from each other?