MCPcopy
hub / github.com/vuejs/core / deleteProperty

Method deleteProperty

packages/reactivity/src/baseHandlers.ts:194–205  ·  view source on GitHub ↗
(
    target: Record<string | symbol, unknown>,
    key: string | symbol,
  )

Source from the content-addressed store, hash-verified

192 }
193
194 deleteProperty(
195 target: Record<string | symbol, unknown>,
196 key: string | symbol,
197 ): boolean {
198 const hadKey = hasOwn(target, key)
199 const oldValue = target[key]
200 const result = Reflect.deleteProperty(target, key)
201 if (result && hadKey) {
202 trigger(target, TriggerOpTypes.DELETE, key, undefined, oldValue)
203 }
204 return result
205 }
206
207 has(target: Record<string | symbol, unknown>, key: string | symbol): boolean {
208 const result = Reflect.has(target, key)

Callers

nothing calls this directly

Calls 2

hasOwnFunction · 0.90
triggerFunction · 0.90

Tested by

no test coverage detected