diff --git a/globals/globals.ts b/globals/globals.ts index 2be0fd267..639b0178a 100644 --- a/globals/globals.ts +++ b/globals/globals.ts @@ -1,11 +1,4 @@ -import types = require("utils/types"); -import timer = require("timer"); -import consoleModule = require("console"); -import xhr = require("xhr/xhr"); -import dialogs = require("ui/dialogs"); -var fetchModule = require("fetch"); - -// This method iterates all the keys in the source exports object and copies them to the destination exports one. +// This method iterates all the keys in the source exports object and copies them to the destination exports one. // Note: the method will not check for naming collisions and will override any already existing entries in the destination exports. global.moduleMerge = function (sourceExports: any, destExports: any) { for (var key in sourceExports) { @@ -13,6 +6,13 @@ global.moduleMerge = function (sourceExports: any, destExports: any) { } } +import types = require("utils/types"); +import timer = require("timer"); +import consoleModule = require("console"); +import xhr = require("xhr/xhr"); +import dialogs = require("ui/dialogs"); +var fetchModule = require("fetch"); + global.moduleMerge(fetchModule, global); global.setTimeout = timer.setTimeout;