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

Function getVueInternalClasses

src/utils/helper.ts:93–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91 | undefined
92
93export const getVueInternalClasses = () => {
94 if (!vueInternalClasses) {
95 const vm: any = defineComponentInstance(getVueConstructor(), {
96 computed: {
97 value() {
98 return 0
99 },
100 },
101 })
102
103 // to get Watcher class
104 const Watcher = vm._computedWatchers.value.constructor
105 // to get Dep class
106 const Dep = vm._data.__ob__.dep.constructor
107
108 vueInternalClasses = {
109 Watcher,
110 Dep,
111 }
112
113 vm.$destroy()
114 }
115
116 return vueInternalClasses
117}

Callers 1

computedFunction · 0.90

Calls 2

getVueConstructorFunction · 0.90
defineComponentInstanceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…