Go To Declaration or Usage Is Broken

Hello there,


Since Webstorm version 2020.2 (version 202.6397.88). I created an example of the project to demonstrate the behavior changes.

Project link: https://github.com/Selvatico/declaration-is-broken

File: https://github.com/Selvatico/declaration-is-broken/blob/master/src/estate/portfolio.ts

  • Whenever you click(Cmd+Click) or (Context Menu - Go to -> Declaration or Usage) in 2020.1 version on any field inside relation1 field (like joinColumn, etc.) you go to TypeORM declaration file EntitySchemaRelationOptions.d.ts and check the documentation.
  • Whenever you click (Cmd+Click) in 2020.2 version it always tries to find usage of the field and doesn't give you an option to check declaration file - since it places where people usually list available fields, params, and place documentation and comments (all hot-keys combination and context menu options were checked to get to declaration file - it doesn't work).

On top of that in this particular example if you try to add a new field to relation1 like onDelete which has a restricted set of values. if you type quotes and hit autocomplete (Ctr + Space) in 2020.1 you see only allowed list like this:


In 2020.2 it doesn't help you at all and doesn't help you to read even about possible options.



All together it makes usage of external NPM libraries is unbearable. The example project is created from scratch, cache was invalidated. The same behavior noticed in GoLang by other colleagues of mine.


I feel like there are some changes in the settings or this functionality got broken. Should I report it as a bug in the tracker?


Best regards.


1 comment
Comment actions Permalink

should be fixed in 2020.2.1, see https://youtrack.jetbrains.com/issue/WEB-46727.
For now, I can only recommend adding "types": "./index.d.ts", to node_modules/typeorm/package.json and re-opening the project


Please sign in to leave a comment.