使用 UIGrid 和 Typescript DefinitelyTyped

Working with UIGrid and Typescript DefinitelyTyped

UI Grid (RC3) 的新版本似乎对 nggrid 进行了相当多的架构更改,并且 nggrid 的 definitelytyped 文件给我带来了问题,因为它们是不同的版本。

新版uigrid会有definitelytyped吗?

Is there going to be a definitelytyped for the new version of uigrid

终于。您可以在这里申请:https://github.com/borisyankov/DefinitelyTyped/labels/Definition%3ARequest or and perhaps even ping the original authors directly : https://github.com/borisyankov/DefinitelyTyped/blob/master/ng-grid/ng-grid.d.ts#L3

现在您可以从两个不同的来源获得 typedefinition of ui grid,这与 Ben Tesser 的相同作品:https://github.com/btesser

First one is on nuget, Second one 在 github

第一次提交已于 2015 年 7 月 8 日完成

它可能需要一些修复。

在我的例子中,在 IGridOptions 中添加这两个字段:

IGridOptions  {

        useExternalSorting?: boolean;
        enableGridMenu?: boolean; 
...
}