RxJS version: RC4
Code to reproduce:
interface Bar {
bar?: string;
}
class Foo implements Bar {
constructor(public bar: string = 'name') {}
}
let foo: Foo = new Foo();
Observable.of(foo)
.filter(foo => foo.bar === 'name')
.subscribe(foo => console.log(foo.bar)); <--- works fine
let foo2: Bar = new Foo(); <--- type is interface, not the class
Observable.of(foo2)
.filter(foo => foo.bar === 'name')
.subscribe(foo => console.log(foo.bar)); <-- "Property 'bar' does not exist on type '{}'"
Expected behavior:
Typing to be maintained through the filter() function.
Actual behavior:
Type is lost downstream from .filter,() instead being typed as '{}'
Additional information:
Worked in RC2. Occurs for all functions changed in RC3