Skip to content

Commit f13c259

Browse files
Update aspnet-prerendering to use TS 2.0 and @types
1 parent bc42e59 commit f13c259

File tree

4 files changed

+10
-22
lines changed

4 files changed

+10
-22
lines changed

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Helpers for server-side rendering of JavaScript applications in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
55
"main": "index.js",
66
"scripts": {
7-
"prepublish": "rimraf *.d.ts && tsd update && tsc && echo 'Finished building NPM package \"aspnet-prerendering\"'",
7+
"prepublish": "rimraf *.d.ts && tsc && echo 'Finished building NPM package \"aspnet-prerendering\"'",
88
"test": "echo \"Error: no test specified\" && exit 1"
99
},
1010
"author": "Microsoft",
@@ -21,6 +21,8 @@
2121
"es6-promise": "^3.1.2"
2222
},
2323
"devDependencies": {
24+
"@types/node": "^6.0.42",
25+
"@types/whatwg-fetch": "0.0.31",
2426
"rimraf": "^2.5.4",
2527
"typescript": "^2.0.0"
2628
}

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function findBootFunc(applicationBasePath: string, bootModule: BootModuleInfo, c
174174

175175
function bindPromiseContinuationsToDomain(promise: Promise<any>, domainInstance: domain.Domain) {
176176
const originalThen = promise.then;
177-
promise.then = function then(resolve, reject) {
177+
promise.then = (function then(resolve, reject) {
178178
if (typeof resolve === 'function') {
179179
resolve = domainInstance.bind(resolve);
180180
}
@@ -184,5 +184,5 @@ function bindPromiseContinuationsToDomain(promise: Promise<any>, domainInstance:
184184
}
185185

186186
return originalThen.call(this, resolve, reject);
187-
};
187+
}) as any;
188188
}

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
"module": "commonjs",
55
"target": "es5",
66
"declaration": true,
7-
"outDir": "."
7+
"outDir": ".",
8+
"lib": ["es2015", "dom"]
89
},
10+
"files": [
11+
"src/index.ts"
12+
],
913
"exclude": [
1014
"node_modules"
1115
]

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/tsd.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)