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
Error on $ in angular-protractor.d.ts #4725
Comments
@basvandenheuvel : See #4507. Sorry I don't know the solution for Visual Studio though. |
Thanks, I indeed wasn't able to solve this problem in VS. I just commented the line in the .d.ts file... |
What is the "correct" way around this issue? I'm using the angular2 seed but added jQuery to run third party scripts and I'm hitting this issue. Commenting out is fine for now but is very hacky.. |
@DennisRoam They closed the issue without giving any kind of solution, sorry. At the moment i just comment the line.... The problem is if you run npm update or npm install, the file is downloaded again and you have to comment the line again. I don't understand why angular would declare a var named $ since thats JQuery's for the past years |
+1 I did the hack that @basvandenheuvel said |
as a workaround, since jquery does not distribute a jquery.d.ts file, the file definition of jquery.d.ts could be placed in [source-code-base-dir]/typings/jquery.d.ts or declare a new module as such (a bit hacky): I personally think this is not a problem with angular2 d.ts files and more likely incorrect import of jquery. |
Hmm, well I'm not convinced. As @basvandenheuvel said, $ has belonged to jQuery for quite some time. I'm also having this problem and I'm hoping for a more permanent solution than to keep commenting the line in angular2 (or changing the jquery.d.ts file). |
I had the same issue with $. |
@vladimir-ivanov's solution works |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Hi,
I'm getting an error on
in the
angular-protractor.d.ts
of angular alpha 42.( I just upgraded from .37 to .42, so i don't know if this problem is there since 38.. 39 .. 40...)
I think it conflicts with the
jquery.d.ts
which exports the$
.I'm using VisualStudio 2015. The error i get is
Build: Subsequent variable declarations must have the same type. Variable '$' must be of type 'JQueryStatic', but here has type 'cssSelectorHelper'.
Does anyone have a solution? Commenting the line seems like a workaround but doesn't feel right.
The text was updated successfully, but these errors were encountered: