Reputation: 192
I am trying to import Subject and fromEvent from rxjs as below.
import { Subject } from "rxjs";
import { fromEvent, Subject } from 'rxjs';
The error i specified in the title shows up in the console.
This is my package.json dependencies:
"dependencies": {
"@types/node": "^10.12.18",
"@types/powerapps-component-framework": "^1.2.0",
"bootstrap": "^5.0.1",
"jquery": "^3.6.0",
"popper.js": "^1.16.1",
"rxjs": "^7.1.0"
},
Upvotes: 4
Views: 5530
Reputation: 305
Your TypeScript version is likely out of date. The breaking changes for RxJS 7 denote:
TS: RxJS requires TS 4.2
Using an outdated version will yield that error. Updating your TS version to the latest should also solve this.
Upvotes: 7