I want to build upon @Ronan Quillevere's and @ffxsam's answers.
Ronan's approach shows information in VSCode when hovering over the interface as shown in his comment.
However, when using that interface as in the following example, hovering over the destructured vars of the last line does not show the documentation from the member/field tag, but from the comment inside the interface, as ffxsam suggested.
/**
* This is the description of the interface
*
* @interface EditDialogField
* @member {string} label is used for whatever reason
* @field {string} prop is used for other reason
*/
interface EditDialogField {
/** Doc inside the interface */
label: string;
prop: string;
required?: boolean;
type: 'input';
}
const dialog: EditDialogField = { label: 'label', prop: 'prop', type: 'input' };
const { label, prop } = dialog;
These pics better show the behavior in VSCode.
I'm not sure if there is way to unify this, but it would be great