atom-ternjs icon indicating copy to clipboard operation
atom-ternjs copied to clipboard

Autocomplete object keys for object function argument

Open ghost opened this issue 8 years ago • 1 comments

Hello,

I use this method of sending in object arguments all the time:

/**
 * @param {Object} options description
 * @param {number} options.age description
 * @param {string} options.name description
 */
function x(options){
  var name = options.name;
  var age = options.age;
}

When I type x(, it has the correct autocomplete showing the parameters - great! However, when I continue typing x({ }), the hints disappear. Sometimes I have like 20 different things that go into the options argument of a function, and it would be great if ternjs offered autocomplete while writing the object like this:

x({
  na  // should show an autocomplete for name
})

Is there a way to get this to work currently? I have enabled basically all the settings hoping this would work, but it hasn't so far.

ghost avatar May 18 '17 19:05 ghost

the type view hides if inside a new object within parameters. Currently this is by design but i'll try to think about it.

tststs avatar Mar 03 '19 17:03 tststs