I have a 3rd party typescript definition file (JayData):
declare module MyEntities
{
export class Container extends $data.EntityContext
{
public onReady(): $data.IPromise<any>;
public onReady(handler: (context: Container) => void): $data.IPromise<any>;
public Users: $data.EntitySet<Models.UserModel>;
}
}
But a valid piece of Javascript is how to initialize the MyEntities class:
var db = new MyEntities({ name: 'local', databaseName: 'MyDb' });
But for TS this doesn't make sense, MyEntities is a module and not a class, thus throwing the compile error: Cannot invoke an expression whose type lacks a call signature.
Is there any way around this to ignore this compile error?