4

我们只是喜欢 TypeScript。它使我们的生活更轻松。我特别喜欢 Web Essentials 赋予的智能感知部分。

我不确定如何正确实现这一点。

我们使用如下评论:

/** This function returns the current user */

当键入引用声明注释的 .ts 文件的 TypeScript 文件时,它会完美显示。

但是“maintainSelection”选项的评论没有出现

/** CttGrid options */
export interface CttGridOptions extends kendo.ui.GridOptions
{
    /** true - Rows scrolled out of view are maintained */
    maintainSelection: boolean;
}

...

var activiteitenInGrid : kendoWrappers.CttGrid = $('#werkpakketActiviteitenInGrid').kendoCttGrid
({
    navigatable: true,
    pageable: false,
    sortable: true,
    groupable: true,
    resizable: true,
    filterable: true,
    selectable: 'multiple',
    maintainSelection: true,
    scrollable: {
    virtual: true
    },
    editable: "incell",
    columns: activiteitenColumns
}).data('kendoCttGrid');

现在,当我将鼠标悬停在“maintainSelection”选项上时,它说它是一个布尔值,但没有显示评论。因此它可以识别界面描述中的选项,但忘记了注释。有没有办法让这些评论也出现在智能感知中?

问候保罗

4

1 回答 1

1

这不是解决问题的方法,但确实有点帮助。

在 Visual Studio Code 中,将鼠标悬停在函数上时,如果您在 Windows 上按住Ctrl或在 Mac 上按住⌘,它将导致预览窗口显示您可能跳转到的一些函数。这有效地显示了函数中的前几条注释。

于 2019-06-29T21:58:24.723 回答