-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to import in TS project without TS DOM
lib
#6297
Comments
I expect it's this change: #6276 Lines 8 to 14 in f132d0d
IMO, we should just abandon trying to get auto imports to work in VS Code. |
Sigh. Shenanigans. Well, I suppose we can revert that change, but it will cause endless pain for VS Code users. |
How about I just add a fixer to the ESLint rules? |
Actually, why don't we just remove the references that are DOM-only? // tslint:disable: no-reference
/// <reference path="./operators/index.ts" />
/// <reference path="./testing/index.ts" />
// tslint:enable: no-reference I can still add a fixer to the ESLint rule, but what's above will cover 99.9% of the imports. |
🙏 (meaning "yes, please", as we have the same issue) |
Due to this issue: ReactiveX/rxjs#6297
7.1.0 still seems to pull in DOM libs. I had to revert to 6.6.7 on React Native or I ended up with lots of duplicate identifier errors. |
Can we re-open this? |
In
7.0.0-rc.3
and prior it was possible to importrxjs
in a TS project that omitted theDOM
lib
. For example:tsconfig.json
:However in
7.0.0
this is no longer possible because of this change: https://github.com/ReactiveX/rxjs/pull/6276/files#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80R9-R13index.ts
:When I run
tsc --noEmit
I get a bunch of errors:Reduced test case: https://github.com/OliverJAsh/rxjs-v7-no-dom-lib-test
For context, we use RxJS in a Node project and TS is configured to omit the
DOM
lib
(it's included by default) since we want to disallow references to things likewindow
in a Node file.The text was updated successfully, but these errors were encountered: