[英]aurelia-fetch-client.d.ts undefined symbols
為whatwg-fetch添加typescript定義文件:
https://github.com/borisyankov/DefinitelyTyped/blob/master/whatwg-fetch/whatwg-fetch.d.ts
以下是有關獲取規范的更多信息:
這是可能的用途typings
安裝WHATWG取類型。
npm install typings --global
typings install dt~whatwg-fetch --global
以上從DefinitelyTyped ( dt
)安裝它們。
npm install --save @types/whatwg-fetch
注意:TypeScript可能仍會抱怨它“無法找到名稱'URLSearchParams'。” 我們可以通過在我們的一個打字文件中添加一個接口來解決這個問題。 例如:
custom_typings / adhoc_interfaces.d.ts
interface URLSearchParams {}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.