作者:Superficial1987542_y3 | 来源:互联网 | 2022-12-03 19:56
我正在从角度5迁移到角度6。当我使npm run build时,我将其抛出以下错误:
ngc编译失败:ng-formly / core / src / components / formly.field.ts(10,10):错误TS2305:模块'“ C:/PrjNET/Elevation3/FW/4.00/Mainline/Framework/Development/Client/ ElevationJS / ngcore / .tmp / node_modules / rxjs / Subscription“'没有导出的成员'Subscription'。
我有一个类似的错误:rxjs/Subscription has no exported member Subscription
我可以通过导入Subscription来解决:
import { Subscription } from "rxjs";
但是我不能这样做ISubscription
。
谁知道如何导入ISubscription?
1> cartant..:
在RxJS v6中,将ISubscription
其重命名为SubscriptionLike
,因为这是Typescript自己的类型声明中使用的约定。
同样,IScheduler
已重命名为SchedulerLike
。