Closed probert94 closed 4 years ago
Try to update TypeScript to 2.4 in your package.json. I had a problem with rx.js and TypeScript. I updated TypeScript to 2.4.0 and rx to the latest. That helped. I know that this is not rx related but give it a try.
@Chris2011 thanks for your answer. The problem is, that I can't update the TypeScript version, since the plugin is bundled with one. So the options are only TypeScript 2.3.2 or TypeScript 2.3.3. I tryed both and both have the same issue.
The Problem with rx.js is probably another problem I had (it did not recognize the return type of flatMap
anymore).
The problem I am describing here is with Promis
es having different type-definitions, which seem to create a conflict:
1: Promise<R>
2: Promise<T>
Result: Promise<R,T>
The plugin uses the TypeScript language server. Of course you can update TS from your project. It is still possible. I had issues with Jenkins, so there is no plugin used, I updated TS and eveything worked fine.
@Chris2011 so info in Versioning is wrong?
I am currently using Plugin version 2.1.5.3, with which I had no problems.
I only have a global TypeScript-Version installed (2.1.5), so there has to be a Version bundled with the Plugin. Otherwise updating only the plugin shouldn't cause errors.
Does it automatically use embedded TypeScript if no local installation has been found?
I don't know, I don't have typescript globally installed. I use angular-cli and the project template of it. Try to update the local project typescript version.
Thanks for your information. I am having this problem only in an old Project (which is still using Angular Beta 17) and I want to switch to Angular2-Eclipse anyways, so I'll stick with version 2.1.5.3, since there haven't been many changes in the plugin.
I just thought this might be an Issue for other people too, since I found issues for other TypeScript-Tools regarding the same problem.
Since the Version 2.3.2.0 of this plugin, I am getting errors when using
Promise
es.It tells me that the generic type
Promise
needs 2 type arguments, instead of one.This is because the typings of the Plugin (lib.d.ts) define
Promise<T>
and the installed one innode_modules
(es6-promise.d.ts) definePromise<R>
.Therefore it thinks it's
Promise<R, T>
, which ofc is wrong.I found a similar Issue for another product. They solved it by removing the built-in typings, so that users can install their own.