Let's imagine a scenario where there is an OriginalService class with various methods
class OriginalService {
method1() { }
method2() { }
method3() { }
..
}
Now, suppose we need to create a mock of OriginalService that will only be used with method1.
If we try the following approach, TypeScript will flag missing methods on mockService
let mockService: OriginalService;
mockService = {
method1() {
}
Is there a way to declare mockService as OriginalService without explicitly listing all of OriginalService's properties?