You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right click -> Go to definition on gulp -> Opens @types/gulp/index.d.ts
Actual behavior:
Right click -> Go to definition on gulp -> Opens gulp/index.js
Using the imported gulp also makes it obvious that all the types are being loaded from the located .js and not the @types.d.ts. This causes serious editor usability issues as your included type definitions are overridden by the required js!
The text was updated successfully, but these errors were encountered:
@billti I think this has something to do with #9384. I think it's taking priority over #8670 and #9095.
weswigham
changed the title
Typescript LS is preferring .js to .d.ts when loading types
Typescript LS is preferring .js to @types .d.ts when loading types
Jun 29, 2016
Doh! Yeah, makes sense. I'll need to somehow locate the .js file, but defer using it until other type resolution from other search locations fail. Will take a look a bit later, but will revert in the meantime.
@billti I think I can make a PR fixing it - one of my other PRs already alters that area a bit, so I'm familiar with it, and I think the changes I already have only need minor tweaks to fix this.
TypeScript Version: nightly (2.0.0-dev.201xxxxx)
Code
npm install --save-dev gulp
npm install --save-dev @types/gulp
Expected behavior:
Right click -> Go to definition on
gulp
-> Opens@types/gulp/index.d.ts
Actual behavior:
Right click -> Go to definition on
gulp
-> Opensgulp/index.js
Using the imported
gulp
also makes it obvious that all the types are being loaded from the located.js
and not the@types
.d.ts
. This causes serious editor usability issues as your included type definitions are overridden by the required js!The text was updated successfully, but these errors were encountered: