@optique/core 1.0.0-dev.1880 → 1.0.0-dev.1884

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,6 +79,8 @@ function cacheProtectedMethod(cache, key, factory) {
79
79
  return created;
80
80
  }
81
81
  function getProtectedClonePropertyValue(cache, target, key, value, context) {
82
+ const ownDescriptor = Reflect.getOwnPropertyDescriptor(target, key);
83
+ if (ownDescriptor != null && "value" in ownDescriptor && ownDescriptor.configurable === false && ownDescriptor.writable === false) return ownDescriptor.value;
82
84
  if (typeof value !== "function") return protectAnnotationValue(value, context);
83
85
  if (key === "constructor") return value;
84
86
  return cacheProtectedMethod(cache, key, () => value.bind(target));
@@ -78,6 +78,8 @@ function cacheProtectedMethod(cache, key, factory) {
78
78
  return created;
79
79
  }
80
80
  function getProtectedClonePropertyValue(cache, target, key, value, context) {
81
+ const ownDescriptor = Reflect.getOwnPropertyDescriptor(target, key);
82
+ if (ownDescriptor != null && "value" in ownDescriptor && ownDescriptor.configurable === false && ownDescriptor.writable === false) return ownDescriptor.value;
81
83
  if (typeof value !== "function") return protectAnnotationValue(value, context);
82
84
  if (key === "constructor") return value;
83
85
  return cacheProtectedMethod(cache, key, () => value.bind(target));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.0.0-dev.1880+7cc974b7",
3
+ "version": "1.0.0-dev.1884+abf48013",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",