mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Make moduleMerge the first function (other requires use it).
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user