Make moduleMerge the first function (other requires use it).

This commit is contained in:
atanasovg
2015-07-27 19:40:07 +03:00
parent 1439313e7b
commit 4589bc6565

View File

@@ -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;