|
1 | | -// This method iterates all the keys in the source exports object and copies them to the destination exports one. |
| 1 | +// Required by TypeScript compiler |
| 2 | +require("./decorators"); |
| 3 | + |
| 4 | +// Required by V8 snapshot generator |
| 5 | +global.__extends = global.__extends || function (d, b) { |
| 6 | + for (var p in b) { |
| 7 | + if (b.hasOwnProperty(p)) { |
| 8 | + d[p] = b[p]; |
| 9 | + } |
| 10 | + } |
| 11 | + function __() { this.constructor = d; } |
| 12 | + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
| 13 | +}; |
| 14 | + |
| 15 | +// This method iterates all the keys in the source exports object and copies them to the destination exports one. |
2 | 16 | // Note: the method will not check for naming collisions and will override any already existing entries in the destination exports. |
3 | 17 | global.moduleMerge = function (sourceExports: any, destExports: any) { |
4 | 18 | for (var key in sourceExports) { |
@@ -44,16 +58,6 @@ global.zonedCallback = function (callback: Function): Function { |
44 | 58 | } |
45 | 59 | } |
46 | 60 |
|
47 | | -global.__extends = global.__extends || function (d, b) { |
48 | | - for (var p in b) { |
49 | | - if (b.hasOwnProperty(p)) { |
50 | | - d[p] = b[p]; |
51 | | - } |
52 | | - } |
53 | | - function __() { this.constructor = d; } |
54 | | - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
55 | | -}; |
56 | | - |
57 | 61 | global.registerModule("timer", () => require("timer")); |
58 | 62 | global.registerModule("ui/dialogs", () => require("ui/dialogs")); |
59 | 63 | global.registerModule("xhr", () => require("xhr")); |
@@ -128,8 +132,6 @@ if (platform.device.os === platform.platformNames.android) { |
128 | 132 | global.console.dump = function (args) { c.dump(args); }; |
129 | 133 | } |
130 | 134 |
|
131 | | -require("./decorators"); |
132 | | - |
133 | 135 | export function Deprecated(target: Object, key?: string | symbol, descriptor?: any) { |
134 | 136 | if (descriptor) { |
135 | 137 | var originalMethod = descriptor.value; |
|
0 commit comments