In AureliaSpa, use whatwg-fetch to provide type info

This commit is contained in:
SteveSandersonMS
2016-10-28 15:11:25 +01:00
parent acfb253a40
commit 6bceb234d8
3 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
/// <reference path="../../../../node_modules/aurelia-fetch-client/doc/whatwg-fetch.d.ts" />
// The following line is a workaround for aurelia-fetch-client requiring the type UrlSearchParams
// to exist in global scope, but that type not being declared in any public @types/* package.
/// <reference path="../../../../node_modules/aurelia-fetch-client/doc/url.d.ts" />
import { HttpClient } from 'aurelia-fetch-client';
import { inject } from 'aurelia-framework';

View File

@@ -22,6 +22,7 @@
},
"devDependencies": {
"@types/node": "^6.0.45",
"@types/whatwg-fetch": "0.0.32",
"aspnet-webpack": "^1.0.11",
"aurelia-webpack-plugin": "^1.1.0",
"copy-webpack-plugin": "^3.0.1",

View File

@@ -7,7 +7,7 @@
"emitDecoratorMetadata": true,
"skipDefaultLibCheck": true,
"lib": [ "es6", "dom" ],
"types": [ "node" ]
"types": [ "node", "whatwg-fetch" ]
},
"exclude": [ "bin", "node_modules" ],
"atom": { "rewriteTsconfig": false }