(target, key, value, receiver)
| 1125 | super(false, isShallow2); |
| 1126 | } |
| 1127 | set(target, key, value, receiver) { |
| 1128 | let oldValue = target[key]; |
| 1129 | const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key); |
| 1130 | if (!this._isShallow) { |
| 1131 | const isOldValueReadonly = /* @__PURE__ */ isReadonly(oldValue); |
| 1132 | if (!/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) { |
| 1133 | oldValue = /* @__PURE__ */ toRaw(oldValue); |
| 1134 | value = /* @__PURE__ */ toRaw(value); |
| 1135 | } |
| 1136 | if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) { |
| 1137 | if (isOldValueReadonly) { |
| 1138 | return true; |
| 1139 | } else { |
| 1140 | oldValue.value = value; |
| 1141 | return true; |
| 1142 | } |
| 1143 | } |
| 1144 | } |
| 1145 | const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key); |
| 1146 | const result = Reflect.set( |
| 1147 | target, |
| 1148 | key, |
| 1149 | value, |
| 1150 | /* @__PURE__ */ isRef(target) ? target : receiver |
| 1151 | ); |
| 1152 | if (target === /* @__PURE__ */ toRaw(receiver)) { |
| 1153 | if (!hadKey) { |
| 1154 | trigger(target, "add", key, value); |
| 1155 | } else if (hasChanged(value, oldValue)) { |
| 1156 | trigger(target, "set", key, value); |
| 1157 | } |
| 1158 | } |
| 1159 | return result; |
| 1160 | } |
| 1161 | deleteProperty(target, key) { |
| 1162 | const hadKey = hasOwn(target, key); |
| 1163 | target[key]; |
no test coverage detected