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

Function createRecord

packages/runtime-core/src/hmr.ts:74–83  ·  view source on GitHub ↗
(id: string, initialDef: HMRComponent)

Source from the content-addressed store, hash-verified

72}
73
74function createRecord(id: string, initialDef: HMRComponent): boolean {
75 if (map.has(id)) {
76 return false
77 }
78 map.set(id, {
79 initialDef: normalizeClassComponent(initialDef),
80 instances: new Set(),
81 })
82 return true
83}
84
85function normalizeClassComponent(component: HMRComponent): ComponentOptions {
86 return isClassComponent(component) ? component.__vccOpts : component

Callers 5

registerHMRFunction · 0.85
hmr.spec.tsFile · 0.85
hydration.spec.tsFile · 0.85
Teleport.spec.tsFile · 0.85
Transition.spec.tsFile · 0.85

Calls 3

normalizeClassComponentFunction · 0.85
hasMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected