Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rxjs/Subscription has no exported member 'ISubscription'

Tags:

angular

rxjs

I'm migrating from angular 5 to angular 6. When I make npm run build, I'm it is throw to the console the following error:

ngc compilation failed: 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"' has no exported member 'Subscription'.

I had a similar error: rxjs/Subscription has no exported member Subscription and I solve by importing Subscription like this:

import { Subscription } from "rxjs";

But I cannot do the same to ISubscription.

Any one knows how can import ISubscription ?

like image 951
Ricardo Rocha Avatar asked Sep 25 '18 13:09

Ricardo Rocha


1 Answers

In RxJS v6, ISubscription was renamed to SubscriptionLike, as that's the convention used in Typescript's own type declarations.

Similarly, IScheduler was renamed to SchedulerLike.

like image 58
cartant Avatar answered Oct 05 '22 05:10

cartant