|
12 | 12 | d; |
13 | 13 |
|
14 | 14 | if ( |
15 | | - typeof global.Reflect === "object" && |
16 | | - typeof global.Reflect.decorate === "function" |
| 15 | + typeof globalThis.Reflect === "object" && |
| 16 | + typeof globalThis.Reflect.decorate === "function" |
17 | 17 | ) { |
18 | | - r = global.Reflect.decorate(decorators, target, key, desc); |
| 18 | + r = globalThis.Reflect.decorate(decorators, target, key, desc); |
19 | 19 | } else { |
20 | 20 | for (var i = decorators.length - 1; i >= 0; i--) { |
21 | 21 | if ((d = decorators[i])) { |
|
56 | 56 | var __extends = function (Child, Parent) { |
57 | 57 | var extendNativeClass = |
58 | 58 | !!Parent.extend && Parent.extend.toString().indexOf("[native code]") > -1; |
| 59 | + |
59 | 60 | if (!extendNativeClass) { |
60 | 61 | __extends_ts(Child, Parent); |
61 | 62 | return; |
|
189 | 190 | } |
190 | 191 | }; |
191 | 192 | } |
| 193 | + Object.defineProperty(globalThis, "__native", { value: __native }); |
| 194 | + Object.defineProperty(globalThis, "__extends", { value: __extends }); |
| 195 | + Object.defineProperty(globalThis, "__decorate", { value: __decorate }); |
| 196 | + |
192 | 197 |
|
193 | | - Object.defineProperty(global, "__native", { value: __native }); |
194 | | - Object.defineProperty(global, "__extends", { value: __extends }); |
195 | | - Object.defineProperty(global, "__decorate", { value: __decorate }); |
196 | 198 |
|
197 | | - if (!global.__ns__worker) { |
198 | | - global.JavaProxy = JavaProxy; |
| 199 | + if (!globalThis.__ns__worker) { |
| 200 | + globalThis.JavaProxy = JavaProxy; |
199 | 201 | } |
200 | | - global.Interfaces = Interfaces; |
| 202 | + globalThis.Interfaces = Interfaces; |
201 | 203 |
|
202 | | - if (global.WeakRef && !global.WeakRef.prototype.get) { |
203 | | - global.WeakRef.prototype.get = global.WeakRef.prototype.deref; |
| 204 | + if (globalThis.WeakRef && !globalThis.WeakRef.prototype.get) { |
| 205 | + globalThis.WeakRef.prototype.get = globalThis.WeakRef.prototype.deref; |
204 | 206 | } |
205 | 207 |
|
206 | 208 | // Native array access: numeric indexing and the map/forEach/toString/ |
|
0 commit comments