Closed
Description
RxJS version:
RXJS Version: 5.1.0
Code to reproduce:
interface Action = {
type: string;
}
function loadTasks(){
return this.service.load()
.map<any[],Action>(_ => ({type:"TASKS_LOADED"}))
.catch<Action,Action>((e: any) => Observable.of({broken:"True"}))
}
Expected behavior:
Given code should throw an error as {broken:"True"}
cannot be converted to an Action
Actual behavior:
No Errors, code compiles fine
Additional information:
If I change the code to:
function loadTasks(){
return this.service.load()
.map<any[],Action>(_ => ({type:"TASKS_LOADED"}))
.catch<Action,Action>((e: any) => Observable.of<Action>({broken:"True"}))
}
I get the expected error.
Metadata
Assignees
Labels
No labels
Activity