-
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
error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the lib
compiler option to es2015 or later.
#4448
Comments
If you are targeting an earlier version of JS, you will need a |
I'm not targeting an earlier version of JS (or trying to anyway), I'm just trying to get things working for node v11.6 which is the newest. |
You should include a minimal repro with the exact settings that see the error effected. The SO question includes more than one set of |
Not sure where the complexity is (the se had the conf and the code) but I'm happy to do it. |
Now remove RxJS from your minimal repro and add the following instead: type P = typeof Promise; If the error is still effected, you can close this and report it in the TypeScript repo, instead. |
Whelp, it is. I'll file the bug in TypeScript. |
@cartant bug found |
Yeah, that rings a bell. I think I've been bitten by that behaviour in the past. |
https://twitter.com/TheEvanCarroll/status/1080899909522477061 (if you care to vote on it) |
So what was the conclusion here? I'm getting the same error - followed here from stack overflow |
@reed-lawrence The conclusion is that this is - as discussed above - not an RxJS issue. |
Bug Report
error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the
lib
compiler option to es2015 or later.Current Behavior
Reproduction
https://stackoverflow.com/questions/54014405/ts2585-promise-only-refers-to-a-type-but-is-being-used-as-a-value-here?noredirect=1#comment94866023_54014405
Environment
see https://stackoverflow.com/questions/54014405/ts2585-promise-only-refers-to-a-type-but-is-being-used-as-a-value-here?noredirect=1#comment94866023_54014405
The text was updated successfully, but these errors were encountered: