Could not use Observable.of in RxJs 6 and Angular 6
问题 import { Observable, of } from "rxjs"; // And if I try to return like this return Observable.of(this.purposes); I am getting an error stating, Property 'of' does not exist on type 'typeof Observable' 回答1: Looks like cartant's comment is correct, the RxJS upgrade guide doesn't cover that method specifically but does say "Classes that operate on observables have been replaced by functions" Which seems to mean all or most of those class methods like .of, .throw etc. have been replaced by a