simple-boot-core
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -7,3 +7,3 @@ import { SimGlobal } from '../global/SimGlobal'; | ||
ReflectUtils.defineMetadata(SimMetadataKey, config, target); | ||
SimGlobal.storage.add(target); | ||
SimGlobal().storage.add(target); | ||
}; | ||
@@ -10,0 +10,0 @@ }; |
@@ -1,7 +0,1 @@ | ||
import { SimpleApplication } from '../SimpleApplication'; | ||
import { ConstructorType } from '../types/Types'; | ||
export declare const SimGlobal: { | ||
_application?: SimpleApplication | undefined; | ||
storage: Set<ConstructorType<any>>; | ||
application: SimpleApplication | undefined; | ||
}; | ||
export declare const SimGlobal: () => any; |
@@ -17,2 +17,18 @@ var g = new (function () { | ||
}())(); | ||
export var SimGlobal = global ? (global.SimGlobal = g) : (window ? window.SimGlobal = g : g); | ||
if (global) { | ||
global.SimGlobal = g; | ||
} | ||
else if (window) { | ||
window.SimGlobal = g; | ||
} | ||
export var SimGlobal = function () { | ||
if (global) { | ||
return global.SimGlobal; | ||
} | ||
else if (window) { | ||
return window.SimGlobal; | ||
} | ||
else { | ||
g; | ||
} | ||
}; |
@@ -17,3 +17,3 @@ import { SimGlobal } from "../global/SimGlobal"; | ||
var _a; | ||
(_a = SimGlobal === null || SimGlobal === void 0 ? void 0 : SimGlobal.application) === null || _a === void 0 ? void 0 : _a.intentManager.onNext(intent); | ||
(_a = SimGlobal().application) === null || _a === void 0 ? void 0 : _a.intentManager.onNext(intent); | ||
}; | ||
@@ -20,0 +20,0 @@ Module.prototype.subscribe = function (intent) { |
{ | ||
"name": "simple-boot-core", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "SimpleApplication.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -39,3 +39,3 @@ var __extends = (this && this.__extends) || (function () { | ||
_this.simOption = simOption; | ||
_this.simstanceManager = (_a = SimGlobal.application) === null || _a === void 0 ? void 0 : _a.simstanceManager; | ||
_this.simstanceManager = (_a = SimGlobal().application) === null || _a === void 0 ? void 0 : _a.simstanceManager; | ||
return _this; | ||
@@ -42,0 +42,0 @@ } |
@@ -9,3 +9,3 @@ import { SimGlobal } from './global/SimGlobal'; | ||
this.intentManager = new IntentManager(this.simstanceManager); | ||
SimGlobal.application = this; | ||
SimGlobal().application = this; | ||
} | ||
@@ -12,0 +12,0 @@ SimpleApplication.prototype.run = function () { |
@@ -5,3 +5,3 @@ import { SimGlobal } from '../global/SimGlobal'; | ||
function SimAtomic(type, simstanceManager) { | ||
if (simstanceManager === void 0) { simstanceManager = (_a = SimGlobal.application) === null || _a === void 0 ? void 0 : _a.simstanceManager; } | ||
if (simstanceManager === void 0) { simstanceManager = (_a = SimGlobal().application) === null || _a === void 0 ? void 0 : _a.simstanceManager; } | ||
var _a; | ||
@@ -8,0 +8,0 @@ this.type = type; |
@@ -167,3 +167,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var _this = this; | ||
SimGlobal.storage.forEach(function (data) { | ||
SimGlobal().storage.forEach(function (data) { | ||
_this.register(data); | ||
@@ -170,0 +170,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1406
57791