0
我有以下功能:如何打字以下jQuery代碼?
$.getJSON("Hierarchy/Data").done((item) => {
var data = item.Value;
});
我使用https://github.com/borisyankov/DefinitelyTyped作爲類型定義。
我想爲item
定義一個類型,但我找不到合適的類型。我試圖將其輸入爲JQueryPromiseCallBack<MyInterface>
,但編譯器說,屬性值不存在。
我錯過了什麼?