From 82c5a53f5d901b80771172211c366ea2a039c327 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 5 Jun 2018 09:34:08 -0400 Subject: [PATCH] es5 support --- package-lock.json | 6 ++++++ package.json | 1 + src/global.d.ts | 2 -- tsconfig.json | 5 +++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 93ab5e47c6..546b3d5186 100644 --- a/package-lock.json +++ b/package-lock.json @@ -171,6 +171,12 @@ "integrity": "sha512-esk3CG25hRtHsVHm+LOjiSFYdw8be3uIY653WUwR43Bro914HSimPgPpqgajkhTJ0awK3RQfaIxP7zvbtCpcyg==", "dev": true }, + "@types/node": { + "version": "8.0.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.19.tgz", + "integrity": "sha512-VRQB+Q0L3YZWs45uRdpN9oWr82meL/8TrJ6faoKT5tp0uub2l/aRMhtm5fo68h7kjYKH60f9/bay1nF7ZpTW5g==", + "dev": true + }, "@types/node-forge": { "version": "0.6.10", "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-0.6.10.tgz", diff --git a/package.json b/package.json index 4e2efe55bd..bc082e5bac 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@angular/compiler-cli": "5.2.0", "@ngtools/webpack": "1.10.2", "@types/lunr": "2.1.5", + "@types/node": "8.0.19", "@types/node-forge": "0.6.10", "@types/papaparse": "4.1.33", "@types/webcrypto": "^0.0.28", diff --git a/src/global.d.ts b/src/global.d.ts index db0c0d97ac..4859a0869e 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -1,4 +1,2 @@ declare function escape(s: string): string; declare function unescape(s: string): string; -declare var require: any; -declare var process: any; diff --git a/tsconfig.json b/tsconfig.json index ebde5f337f..6106250f64 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,8 +4,9 @@ "noImplicitAny": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "module": "es6", - "target": "ES2016", + "module": "commonjs", + "target": "es5", + "lib": ["es5", "es6", "dom"], "allowJs": true, "sourceMap": true, "types": [],