@simplysm/sd-core-common
Advanced tools
Comparing version 3.1.133 to 3.1.134
@@ -6,8 +6,8 @@ "use strict"; | ||
var _a, _b; | ||
const prevDescriptor = (inputDescriptor !== null && inputDescriptor !== void 0 ? inputDescriptor : Object.getOwnPropertyDescriptor(target, propertyName)); | ||
const prevGetter = (_a = prevDescriptor) === null || _a === void 0 ? void 0 : _a.get; | ||
const prevSetter = (_b = prevDescriptor) === null || _b === void 0 ? void 0 : _b.set; | ||
let _val = target[propertyName]; | ||
const getter = function () { | ||
const value = prevGetter ? prevGetter.bind(this)() : _val; | ||
var prevDescriptor = (inputDescriptor !== null && inputDescriptor !== void 0 ? inputDescriptor : Object.getOwnPropertyDescriptor(target, propertyName)); | ||
var prevGetter = (_a = prevDescriptor) === null || _a === void 0 ? void 0 : _a.get; | ||
var prevSetter = (_b = prevDescriptor) === null || _b === void 0 ? void 0 : _b.set; | ||
var _val = target[propertyName]; | ||
var getter = function () { | ||
var value = prevGetter ? prevGetter.bind(this)() : _val; | ||
if (arg.get) { | ||
@@ -18,7 +18,7 @@ arg.get(this, propertyName, value); | ||
}; | ||
const setter = function (value) { | ||
const prevValue = prevGetter ? prevGetter.bind(this)() : _val; | ||
let realValue = value; | ||
var setter = function (value) { | ||
var prevValue = prevGetter ? prevGetter.bind(this)() : _val; | ||
var realValue = value; | ||
if (arg.beforeSet) { | ||
const beforeSetResult = arg.beforeSet(this, propertyName, prevValue, realValue); | ||
var beforeSetResult = arg.beforeSet(this, propertyName, prevValue, realValue); | ||
if (beforeSetResult) { | ||
@@ -25,0 +25,0 @@ realValue = beforeSetResult(); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const PropertyGetSetDecoratorBase_1 = require("./PropertyGetSetDecoratorBase"); | ||
const ObjectUtil_1 = require("../util/ObjectUtil"); | ||
var PropertyGetSetDecoratorBase_1 = require("./PropertyGetSetDecoratorBase"); | ||
var ObjectUtil_1 = require("../util/ObjectUtil"); | ||
function PropertyValidate(def) { | ||
return PropertyGetSetDecoratorBase_1.PropertyGetSetDecoratorBase({ | ||
beforeSet: (target, propertyName) => { | ||
const error = ObjectUtil_1.ObjectUtil.validate(target[propertyName], def); | ||
beforeSet: function (target, propertyName) { | ||
var error = ObjectUtil_1.ObjectUtil.validate(target[propertyName], def); | ||
if (error) { | ||
throw new Error(`입력값이 잘못되었습니다: ${JSON.stringify({ | ||
throw new Error("\uC785\uB825\uAC12\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4: " + JSON.stringify({ | ||
component: target.constructor.name, | ||
propertyName, | ||
propertyName: propertyName, | ||
value: error.value, | ||
errorKeys: Object.keys(error.invalidateDef) | ||
})}`); | ||
})); | ||
} | ||
@@ -17,0 +17,0 @@ } |
{ | ||
"name": "@simplysm/sd-core-common", | ||
"version": "3.1.133", | ||
"version": "3.1.134", | ||
"description": "심플리즘 패키지 - 코어 모듈 (browser/node)", | ||
@@ -5,0 +5,0 @@ "author": "김석래", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
170099
0