import type { HTMLElementConstructor } from './base-bridge-element';
import type { Template } from './template';
import type { ShadowSupportMode } from './vm';
import type { Stylesheets, AccessibleElementProperties } from '@lwc/shared';
export interface LightningElementConstructor {
new (): LightningElement;
readonly prototype: LightningElement;
readonly CustomElementConstructor: HTMLElementConstructor;
delegatesFocus?: boolean;
renderMode?: 'light' | 'shadow';
formAssociated?: boolean;
shadowSupportMode?: ShadowSupportMode;
stylesheets: Stylesheets;
}
type HTMLElementTheGoodParts = {
toString: () => string;
} & Pick;
type RefNodes = {
[name: string]: Element;
};
export interface LightningElementShadowRoot extends ShadowRoot {
/**
* A `LightningElement` will always be attached to an [`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement),
* rather than the more broad `Element` used by the generic shadow root interface.
*/
readonly host: HTMLElement;
/**
* When present, indicates that the shadow root is the synthetic polyfill loaded by
* `@lwc/synethic-shadow`.
*/
readonly synthetic?: true;
}
export interface LightningElement extends HTMLElementTheGoodParts, AccessibleElementProperties {
constructor: LightningElementConstructor;
template: LightningElementShadowRoot | null;
refs: RefNodes | undefined;
hostElement: Element;
render(): Template;
connectedCallback?(): void;
disconnectedCallback?(): void;
renderedCallback?(): void;
errorCallback?(error: any, stack: string): void;
formAssociatedCallback?(): void;
formResetCallback?(): void;
formDisabledCallback?(): void;
formStateRestoreCallback?(): void;
}
/**
* This class is the base class for any LWC element.
* Some elements directly extends this class, others implement it via inheritance.
*/
export declare const LightningElement: LightningElementConstructor;
export declare const lightningBasedDescriptors: PropertyDescriptorMap;
export {};
//# sourceMappingURL=base-lightning-element.d.ts.map