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
{{ message }}
Repository navigation
Typescript Intellisense not working (using Angular4 project) #30003
More info: played around and found that the problem is reproducible when the code is not inside a constructor. (Intellisense works if inside a constructor).
Activity
zaakiy commentedon Jul 2, 2017
Screenshot:

cpamp commentedon Jul 2, 2017
Sometimes intellisense stops working for me as well but closing and reopening vscode fixes it.
mjbvz commentedon Jul 3, 2017
Zaakiy Siddiqui (@zaakiy) Where is
itemsdeclared? Can you share the entire source file?zaakiy commentedon Jul 6, 2017
More info: played around and found that the problem is reproducible when the code is not inside a constructor. (Intellisense works if inside a constructor).
Here is the code from the top:
Edit: I would still like to know if Intellisense is supported outside the constructor, and if so, how to enable that functionality.
mjbvz commentedon Jul 7, 2017
Zaakiy Siddiqui (@zaakiy) Thanks. I've opened microsoft/TypeScript#17026 to track this upstream
As a workaround, change your code to use method syntax:
zaakiy commentedon Jul 7, 2017
Thanks Matt Bierner (@mjbvz).