I'm using TypeScript on an Angular.js project and testing with Jasmine.
When I mock a method on an object using spyOn, Jasmine replaces the method with a function that has a calls property so you can do, for instance, thing.method.calls.count().
The problem is that the TypeScript compiler doesn't know about the calls property on the method and gives a compiler error:
property 'calls' does not exist on type '() => IPromise<IReport[]>'
How do I fix this error? Do I need to define a new interface that has a function signature as well as an object property? I've tried monkeying around with different interface configurations, but without luck so far.