Skip to content

Commit faf2dda

Browse files
authored
fix(types): add synthetic prop to component template (#5426)
1 parent 51aa03a commit faf2dda

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

packages/@lwc/engine-core/src/framework/base-lightning-element.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,17 @@ type RefNodes = { [name: string]: Element };
188188

189189
const refsCache: WeakMap<RefVNodes, RefNodes> = new WeakMap();
190190

191-
/**
192-
* A `LightningElement` will always be attached to an [`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement),
193-
* rather than the more broad `Element` used by the generic shadow root interface.
194-
*/
195191
export interface LightningElementShadowRoot extends ShadowRoot {
192+
/**
193+
* A `LightningElement` will always be attached to an [`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement),
194+
* rather than the more broad `Element` used by the generic shadow root interface.
195+
*/
196196
readonly host: HTMLElement;
197+
/**
198+
* When present, indicates that the shadow root is the synthetic polyfill loaded by
199+
* `@lwc/synethic-shadow`.
200+
*/
201+
readonly synthetic?: true;
197202
}
198203

199204
export interface LightningElement extends HTMLElementTheGoodParts, AccessibleElementProperties {

0 commit comments

Comments
 (0)