Update aspnet-prerendering to use TS 2.0 and @types

This commit is contained in:
SteveSandersonMS
2016-10-05 13:55:00 +01:00
parent bc42e598f9
commit f13c2595b8
4 changed files with 10 additions and 22 deletions

View File

@@ -4,7 +4,7 @@
"description": "Helpers for server-side rendering of JavaScript applications in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
"main": "index.js",
"scripts": {
"prepublish": "rimraf *.d.ts && tsd update && tsc && echo 'Finished building NPM package \"aspnet-prerendering\"'",
"prepublish": "rimraf *.d.ts && tsc && echo 'Finished building NPM package \"aspnet-prerendering\"'",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Microsoft",
@@ -21,6 +21,8 @@
"es6-promise": "^3.1.2"
},
"devDependencies": {
"@types/node": "^6.0.42",
"@types/whatwg-fetch": "0.0.31",
"rimraf": "^2.5.4",
"typescript": "^2.0.0"
}

View File

@@ -174,7 +174,7 @@ function findBootFunc(applicationBasePath: string, bootModule: BootModuleInfo, c
function bindPromiseContinuationsToDomain(promise: Promise<any>, domainInstance: domain.Domain) {
const originalThen = promise.then;
promise.then = function then(resolve, reject) {
promise.then = (function then(resolve, reject) {
if (typeof resolve === 'function') {
resolve = domainInstance.bind(resolve);
}
@@ -184,5 +184,5 @@ function bindPromiseContinuationsToDomain(promise: Promise<any>, domainInstance:
}
return originalThen.call(this, resolve, reject);
};
}) as any;
}

View File

@@ -4,8 +4,12 @@
"module": "commonjs",
"target": "es5",
"declaration": true,
"outDir": "."
"outDir": ".",
"lib": ["es2015", "dom"]
},
"files": [
"src/index.ts"
],
"exclude": [
"node_modules"
]

View File

@@ -1,18 +0,0 @@
{
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"node/node.d.ts": {
"commit": "0144ad5a74053f2292424847259c4c8e1d0fecaa"
},
"es6-promise/es6-promise.d.ts": {
"commit": "0144ad5a74053f2292424847259c4c8e1d0fecaa"
},
"whatwg-fetch/whatwg-fetch.d.ts": {
"commit": "dade4414712ce84e3c63393f1aae407e9e7e6af7"
}
}
}