TypeScript Version: 2.0.3
Code
interface Foo {
/**
* A bar value
*/
bar?: string;
}
/**
* A function
*
* @param foo A param
* @param { bar } Another param
* @param bar Another param
*/
function foo(foo: string, { bar }: Foo): void {
bar;
foo;
}
foo('bar', { bar: 'play' });
Expected behavior:
Intellisense for the second argument, or the second argument properties.
Actual behavior:
No way of providing a description for the destructured elements of a destructured parameter.

+1
As a JS developer relying on destructuring for function parameters, this issue generates a lot of false "problems" when mixing parameters with and without default values.
This does not work on version 1.21.1
/** Class representing a user. */
module.exports = class User {
/**
* Create a User.
* @param {object} user
* @param {string} user.id - The user id in uuid format
* @param {string} user.name - The user name
* @param {string} user.email - The user email
* @param {string} user.password - The user password
*/
constructor({id, name, email, password}) {
this.id = id
this.name = name
this.email = email
this.password = password
}
}
Also an issue when functions return an interface
interface Returns {
/** This object contains a getter that returns itself */
get: (key: string) => string;
}
const buildObject = (): Returns => ({
get: key => key
})
// shows jsdoc description when hovering over "obj1.get"
const obj1 = buildObject();
const a = obj1.get("key")
// Only shows signature "const get: (key: string) => string"
const {get} = buildObject();
const b = get("key");
Most helpful comment
This does not work on version 1.21.1