aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/polyfills.ts
diff options
context:
space:
mode:
authorBO41 <lukasw41@gmail.com>2018-10-18 09:08:59 +0200
committerRigel Kent <par@rigelk.eu>2018-10-18 09:08:59 +0200
commit244b4ae3973bc1511464a08158a123767f83179c (patch)
tree24f4399489167bc92921e3fe0c1c04a87d7c1161 /client/src/polyfills.ts
parent28e51e831bd121f063600a597d7b02f8fd846de9 (diff)
downloadPeerTube-244b4ae3973bc1511464a08158a123767f83179c.tar.gz
PeerTube-244b4ae3973bc1511464a08158a123767f83179c.tar.zst
PeerTube-244b4ae3973bc1511464a08158a123767f83179c.zip
NoImplicitAny flag true (#1157)
this enables the `noImplicitAny` flag in the Typescript compiler > When the noImplicitAny flag is true and the TypeScript compiler cannot infer the type, it still generates the JavaScript files, but it also reports an error. Many seasoned developers prefer this stricter setting because type checking catches more unintentional errors at compile time. closes: #1131 replaces #1137
Diffstat (limited to 'client/src/polyfills.ts')
-rw-r--r--client/src/polyfills.ts51
1 files changed, 26 insertions, 25 deletions
diff --git a/client/src/polyfills.ts b/client/src/polyfills.ts
index eec30760d..dfe45b591 100644
--- a/client/src/polyfills.ts
+++ b/client/src/polyfills.ts
@@ -18,24 +18,26 @@
18 * BROWSER POLYFILLS 18 * BROWSER POLYFILLS
19 */ 19 */
20 20
21/** IE9, IE10 and IE11 requires all of the following polyfills. **/ 21/**
22 * IE9, IE10 and IE11 requires all of the following polyfills.
23 */
22 24
23// For Google Bot 25// For Google Bot
24import 'core-js/es6/symbol'; 26import 'core-js/es6/symbol'
25import 'core-js/es6/object'; 27import 'core-js/es6/object'
26import 'core-js/es6/function'; 28import 'core-js/es6/function'
27import 'core-js/es6/parse-int'; 29import 'core-js/es6/parse-int'
28import 'core-js/es6/parse-float'; 30import 'core-js/es6/parse-float'
29import 'core-js/es6/number'; 31import 'core-js/es6/number'
30import 'core-js/es6/math'; 32import 'core-js/es6/math'
31import 'core-js/es6/string'; 33import 'core-js/es6/string'
32import 'core-js/es6/date'; 34import 'core-js/es6/date'
33import 'core-js/es6/array'; 35import 'core-js/es6/array'
34import 'core-js/es6/regexp'; 36import 'core-js/es6/regexp'
35import 'core-js/es6/map'; 37import 'core-js/es6/map'
36import 'core-js/es6/weak-map'; 38import 'core-js/es6/weak-map'
37import 'core-js/es6/set'; 39import 'core-js/es6/set'
38import 'core-js/es7/object'; 40import 'core-js/es7/object'
39 41
40/** IE10 and IE11 requires the following for NgClass support on SVG elements */ 42/** IE10 and IE11 requires the following for NgClass support on SVG elements */
41// import 'classlist.js'; // Run `npm install --save classlist.js`. 43// import 'classlist.js'; // Run `npm install --save classlist.js`.
@@ -43,17 +45,18 @@ import 'core-js/es7/object';
43/** IE10 and IE11 requires the following for the Reflect API. */ 45/** IE10 and IE11 requires the following for the Reflect API. */
44 46
45// For Google Bot 47// For Google Bot
46import 'core-js/es6/reflect'; 48import 'core-js/es6/reflect'
47 49
48/** Evergreen browsers require these. **/ 50/**
51 * Evergreen browsers require these.
52 */
49// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. 53// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
50import 'core-js/es7/reflect' 54import 'core-js/es7/reflect'
51 55
52
53/** 56/**
54 * Required to support Web Animations `@angular/platform-browser/animations`. 57 * Required to support Web Animations `@angular/platform-browser/animations`.
55 * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation 58 * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
56 **/ 59 */
57// import 'web-animations-js'; // Run `npm install --save web-animations-js`. 60// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
58 61
59/** 62/**
@@ -70,19 +73,17 @@ import 'core-js/es7/reflect'
70*/ 73*/
71// (window as any).__Zone_enable_cross_context_check = true; 74// (window as any).__Zone_enable_cross_context_check = true;
72 75
73
74/*************************************************************************************************** 76/***************************************************************************************************
75 * Zone JS is required by default for Angular itself. 77 * Zone JS is required by default for Angular itself.
76 */ 78 */
77import 'zone.js/dist/zone' // Included with Angular CLI. 79import 'zone.js/dist/zone' // Included with Angular CLI.
78 80
79
80/*************************************************************************************************** 81/***************************************************************************************************
81 * APPLICATION IMPORTS 82 * APPLICATION IMPORTS
82 */ 83 */
83 84
84// global/process polyfills 85// global/process polyfills
85 86
86;(window as any).global = window; 87;(window as any).global = window
87;(window as any).process = require('process/'); 88;(window as any).process = require('process/')
88;(window as any).Buffer = require('buffer/').Buffer; 89;(window as any).Buffer = require('buffer/').Buffer