I have this little snippet
const observable:Observable<number> = Observable.from([1, 2, 3])
.reduce((sum: number, number: number) => {
return sum + number
}, 0)
observable.subscribeOnNext((sum) => console.log(sum))
It works as expected, but the Typescript compiler produces this error:
error TS2339: Property 'reduce' does not exist on type 'Observable'.
If reduce is changed to scan, the error goes away (= the definition of scan is found by the compiler, but the definition of reduce not).
I'm using npm, and have typescript (2.0.10), rx (4.1.0) and @types/rx (2.5.34) installed.
typings, so you might be able to use that - trynpm install --save Reactive-Extensions/RxJS(and remove the old version of RxJS and the types you have installed).