我更新到 Angular 6。没有安装 rxjs-compat。更改我的代码
import {Observable} from "rxjs/Observable";
至
import {Observable} from "rxjs";
等等。
但是如果我做服务我会得到一个错误
ERROR in node_modules/primeng/components/accordion/accordion.d.ts(4,10): error TS2305: Module '"../JetBrains/WebstormProjects/test5/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/primeng/components/common/confirmationservice.d.ts(1,10): error TS2305: Module '"../JetBrains/WebstormProjects/test5/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/primeng/components/common/messageservice.d.ts(1,10): error TS2305: Module '".../JetBrains/WebstormProjects/test5/node_modules/rxjs/Observable"' has no exported member 'Observable'.
...
等等。
如何修复这些错误?