-
Notifications
You must be signed in to change notification settings - Fork 3k
missing Observable import for visual studio #1696
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
Comments
I don't think there's strong difference between visual studio to other editor configurations since compilation goes through typescript compiler. Would you be able to share what's tsc version and small code snippet able to reproduce issue? |
Same issue and looks like same problem here: |
I wrote the following in a different git repo (apparently it's was the wrong repo to discuss RxJS v5). Rx Operators Cannot Resolve Observable - Visual Studio 2015 & TypescriptThere seems to be a problem with the node module resolutions with all the Rx operators in Visual Studio 2015. No matter what I try, I can not seem to get rid of these typescript errors. For example, when using the RxJS map operator within Angular2 Quickstart package, Visual Studio complains: Severity: Error I have several other npm packages that my typescript project does not complain about. Just the RxJS operators. For some reason, when I browse to any type definition file under "node_modules\rxjs\add\operator" all of them are showing the above error on the line with My project compiles fine using both the typescript's CLI and Visual Studio's built in compiler, but I am getting a flood of these errors in Visual Studio's error window. It also breaks Typescript's intellisense. I have attempted to include a reference path to Rx.KitchenSink. But I just get more of the same errors. Unfortunately nothing seems to be solving this issue. My tsconfig.json:
My typings.json:
I am using the latest version of everything: I have a second system with a similar setup, the errors also occur there. |
Please see this thread for a description of the issue and workaround |
@vladima You are a life saver. Thanks. |
Appreciate for workaround @vladima . One of reason I switched from VS is about using typescript.. wish VS15 will enhance support. Let me close this issue for now since it's tooling environment, @wizardnet972, please reopen / create new issue if there's something unresolved. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
In every *.d.ts under rx/add,
should add:
import {Observable} from '../../Observable';
for visual studio typescript compiler / intellisense compatibility.
visual studio error message:
Invalid module name in augmentation, module '../../Observable' cannot be found.
for example:
should be:
based on https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#augmenting-globalmodule-scope-from-modules
The text was updated successfully, but these errors were encountered: