microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
100.95k stars 12.48k forks source link

jsdoc typedef (strange behaviour) #12004

Closed waderyan closed 7 years ago

waderyan commented 8 years ago

From @udarkness on October 28, 2016 13:42

I cannot autocomplete a property of an object after its first use

Steps to Reproduce:

  1. Write this code in a Js file:
/**
 * @typedef {Object} My
 * @property {boolean} yes
 */

/**
 * @param {My} my
 */
function a(my) {
    my.yes
}
/**
 * @param {My} my
 */
function b(my) {
    my.
}
  1. try to autocomplete in the function a. Works fine, as expected
  2. try to autocomplete in the function b. It doesn't work at all

Copied from original issue: Microsoft/vscode#14664

waderyan commented 8 years ago

@udarkness thank you for opening this issue. I have reproduced this using the latest Insider build. Migrating to the JavaScript language service repo (TypeScript).

rossipedia commented 7 years ago

I'm currently running into this issue. Is there an expected version for this fix?

mhegazy commented 7 years ago

Should be working correctly in latest drop of TypeSript (typescript@next). VSCode ships with an older version of TypeScript. Please see Using Newer TypeScript Versions documentation for more details on updating your VSCode to use a different version of TypeScript.