【发布时间】:2019-03-01 02:48:27
【问题描述】:
我正在从 angular 5 迁移到 angular 6。当我进行 npm run build 时,我会向控制台抛出以下错误:
ngc 编译失败:ng-formly/core/src/components/formly.field.ts(10,10): error TS2305: Module '"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,我通过像这样导入订阅来解决:
import { Subscription } from "rxjs";
但我不能对ISubscription做同样的事情。
有人知道如何导入 ISubscription 吗?
【问题讨论】:
-
现在是
SubscriptionLike。 -
@cartant 你能把这个作为答案吗?