simple-boot-core
Advanced tools
Comparing version 1.0.33 to 1.0.34
@@ -8,5 +8,6 @@ import "reflect-metadata"; | ||
export declare const SimMetadataKey: unique symbol; | ||
export declare const Sim: (config?: SimConfig) => GenericClassDecorator<ConstructorType<any>>; | ||
export declare function Sim(target: ConstructorType<any>): void; | ||
export declare function Sim(config: SimConfig): GenericClassDecorator<ConstructorType<any>>; | ||
export declare const getSim: (target: ConstructorType<any> | Function | any) => SimConfig | undefined; | ||
export declare const PostConstruct: (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void; | ||
export declare const getPostConstruct: (target: any, propertyKey: string) => any; |
@@ -8,9 +8,14 @@ "use strict"; | ||
exports.SimMetadataKey = Symbol('Sim'); | ||
var Sim = function (config) { | ||
if (config === void 0) { config = {}; } | ||
return function (target) { | ||
ReflectUtils_1.ReflectUtils.defineMetadata(exports.SimMetadataKey, config, target); | ||
exports.sims.add(target); | ||
}; | ||
}; | ||
function Sim(config) { | ||
if (typeof config === 'function') { | ||
ReflectUtils_1.ReflectUtils.defineMetadata(exports.SimMetadataKey, {}, config); | ||
exports.sims.add(config); | ||
} | ||
else { | ||
return function (target) { | ||
ReflectUtils_1.ReflectUtils.defineMetadata(exports.SimMetadataKey, config, target); | ||
exports.sims.add(target); | ||
}; | ||
} | ||
} | ||
exports.Sim = Sim; | ||
@@ -17,0 +22,0 @@ var getSim = function (target) { |
{ | ||
"name": "simple-boot-core", | ||
"version": "1.0.33", | ||
"version": "1.0.34", | ||
"main": "SimpleApplication.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
128529
2685