(id: string, initialDef: HMRComponent)
| 72 | } |
| 73 | |
| 74 | function 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 | |
| 85 | function normalizeClassComponent(component: HMRComponent): ComponentOptions { |
| 86 | return isClassComponent(component) ? component.__vccOpts : component |
no test coverage detected