Skip to content

Intellisense when specifying object properties #40181

@Bibliofile

Description

@Bibliofile
  • VSCode Version: Code 1.18.1 (929bacb, 2017-11-16T18:32:36.023Z)
  • OS Version: Windows_NT x64 10.0.16299
  • Extensions: Extensions are disabled

Steps to Reproduce:

  1. Create a new .ts file with the following code (Copied from Typescript/17352)
/**
 * @param {object} o - has a string and a number
 * @param {string} o.s - the string
 * @param {number} o.n - the number
 */
function f(o) { return o.s.length + o.n; }
  1. Start typing to call the function

image

I would expect the comment the string to show up when modifying the s property, however - the number is always shown.

Using Typescript types does not fix this issue (and is my primary concern):

/**
 * @param o - has a string and a number
 * @param o.s - the string
 * @param o.n - the number
 */
function f(o: {s: string; n: number }) { return o.s.length + o.n; }

Related: Typescript/11597

Metadata

Metadata

Assignees

Labels

javascriptJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions