I'm encountering an issue with TypeScript and Angular. In this case, the foo class is a service that utilizes another service called fooService, which has a method getUser() that returns a promise of a specific type.
Although the compilation seems fine, I'm facing this particular error: TS2409: Return type of constructor signature must be assignable to the instance type of the class
Please provide assistance in resolving this problem.
module fooModule {
export class foo {
static $inject = ['fooService'];
constructor(public fooService:services.fooService) {
return fooService.getUser();
}
}
}