For some reason, I cannot use the takeUntil method for any of my observables.
My IDE (Visual Studio Code) shows this as a valid method while I code and it compiles fine (from typescript), but when I run it, I get takeUntil is not a function according to any of my observables.
I am using rxjs version 5.3.0.
I can do it differently, but this is most likely the easiest:
let subject:BehaviorSubject<any> = new BehaviorSubject<any>({}); let unsubscribe: Subject<void> = new Subject<void>(); subject.takeUntil(unsubscribe);
Honestly, I canβt find a way to create an instance of anything where takeUntil does not lead to this error, but the IDE never complains and typescript always compiles fine - the error always occurs in the browser.
source share