I have following modules in my app:
In Loader.ts:
module Loader {
export default class FLoader {
constructor () {}
// blahblahblah...
}
}
In Renderer.ts:
import Loader from "../Loader";
module Renderer {
export default class FRenderer {
constructor () {}
public SomeFunction(): void {
let myLoader = new Loader(); // error: Cannot use 'new' with an expression whose type lacks a call or construct signature
}
}
}
And I get error noted in the code: Cannot use 'new' with an expression whose type lacks a call or construct signature
I'm following the docs here. What am I doing wrong?
Loaderwhich is a module instead ofFLoaderwhich is a class. A module can't not be instantiated.