MCPcopy
hub / github.com/vuejs/composition-api / setupAccessControl

Function setupAccessControl

src/reactivity/reactive.ts:43–60  ·  view source on GitHub ↗

* Proxing property access of target. * We can do unwrapping and other things here.

(target: AnyObject)

Source from the content-addressed store, hash-verified

41 * We can do unwrapping and other things here.
42 */
43function setupAccessControl(target: AnyObject): void {
44 if (
45 !isPlainObject(target) ||
46 isRaw(target) ||
47 isArray(target) ||
48 isRef(target) ||
49 isComponentInstance(target) ||
50 accessModifiedSet.has(target)
51 )
52 return
53
54 accessModifiedSet.set(target, true)
55
56 const keys = Object.keys(target)
57 for (let i = 0; i < keys.length; i++) {
58 defineAccessControl(target, keys[i])
59 }
60}
61
62/**
63 * Auto unwrapping when access property

Callers 2

defineAccessControlFunction · 0.85
reactiveFunction · 0.85

Calls 7

isPlainObjectFunction · 0.90
isArrayFunction · 0.90
isRefFunction · 0.90
isComponentInstanceFunction · 0.90
isRawFunction · 0.85
defineAccessControlFunction · 0.85
setMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…