refactor: remove toplevel property accesses (#29329)

PR Close #29329
This commit is contained in:
Filipe Silva
2019-05-02 16:44:24 +01:00
committed by Jason Aden
parent 739e5a4f53
commit ac34a1429b
32 changed files with 231 additions and 253 deletions

View File

@ -185,7 +185,7 @@ function urlEncodeParams(params: {[key: string]: any}): URLSearchParams {
const noop = function() {};
const w = typeof window == 'object' ? window : noop;
const FormData = (w as any /** TODO #9100 */)['FormData'] || noop;
const Blob = (w as any /** TODO #9100 */)['Blob'] || noop;
const FormData = (() => (w as any /** TODO #9100 */)['FormData'] || noop)();
const Blob = (() => (w as any /** TODO #9100 */)['Blob'] || noop)();
export const ArrayBuffer: ArrayBufferConstructor =
(w as any /** TODO #9100 */)['ArrayBuffer'] || noop;
(() => (w as any /** TODO #9100 */)['ArrayBuffer'] || noop)();