Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion labs/behaviors/element-internals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ export function mixinElementInternals<T extends MixinBase<LitElement>>(
return this[privateInternals];
}

[privateInternals]?: ElementInternals;
// In preparation for ES2022, we need to declare this property to guard
// against the base class calling [internals] in its constructor prematurely
// setting this field. Without declare, once this field is defined, it would
// initialize to undefined and `attachInternals()` could be called again.
declare [privateInternals]?: ElementInternals;
}

return WithElementInternalsElement;
Expand Down
Loading