Skip to content

Commit bcb9a70

Browse files
committed
types: custom element interface should be internal
1 parent 37ccb9b commit bcb9a70

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

packages/runtime-core/src/component.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,12 @@ export function isClassComponent(value: unknown): value is ClassComponent {
12391239
}
12401240

12411241
export interface ComponentCustomElementInterface {
1242-
injectChildStyle(type: ConcreteComponent): void
1243-
removeChildStyle(type: ConcreteComponent): void
1242+
/**
1243+
* @internal
1244+
*/
1245+
_injectChildStyle(type: ConcreteComponent): void
1246+
/**
1247+
* @internal
1248+
*/
1249+
_removeChildStyle(type: ConcreteComponent): void
12441250
}

packages/runtime-core/src/hmr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function reload(id: string, newComp: HMRComponent) {
162162

163163
// update custom element child style
164164
if (instance.root.ce && instance !== instance.root) {
165-
instance.root.ce.removeChildStyle(oldComp)
165+
instance.root.ce._removeChildStyle(oldComp)
166166
}
167167
}
168168

packages/runtime-core/src/renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ function baseCreateRenderer(
13371337
} else {
13381338
// custom element style injection
13391339
if (root.ce) {
1340-
root.ce.injectChildStyle(type)
1340+
root.ce._injectChildStyle(type)
13411341
}
13421342

13431343
if (__DEV__) {

packages/runtime-dom/src/apiCustomElement.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,11 +609,17 @@ export class VueElement
609609
}
610610
}
611611

612-
injectChildStyle(comp: ConcreteComponent & CustomElementOptions) {
612+
/**
613+
* @internal
614+
*/
615+
_injectChildStyle(comp: ConcreteComponent & CustomElementOptions) {
613616
this._applyStyles(comp.styles, comp)
614617
}
615618

616-
removeChildStyle(comp: ConcreteComponent): void {
619+
/**
620+
* @internal
621+
*/
622+
_removeChildStyle(comp: ConcreteComponent): void {
617623
if (__DEV__) {
618624
this._styleChildren.delete(comp)
619625
if (this._childStyles && comp.__hmrId) {

0 commit comments

Comments
 (0)