@trycourier/courier-ui-core
Version:
The core UI kit for Courier Web Components
25 lines (24 loc) • 913 B
TypeScript
/**
* Resolve the class we can safely `extends`.
* • In the browser → the real `HTMLElement`.
* • During SSR / Node → a no-op stub so `class … extends …` is still valid.
*/
declare const HTMLElementBase: typeof HTMLElement;
/**
* Universal base class for Courier web-components.
*
* ⚠️ IMPORTANT: When you create a concrete element, extend **this**
* (or `HTMLElementBase`) instead of `HTMLElement` directly.
*/
export declare class CourierBaseElement extends HTMLElementBase {
/** Tag-name you’ll use in `customElements.define()` */
static get id(): string;
connectedCallback(): void;
disconnectedCallback(): void;
/** Called **once** when the element first becomes part of the DOM. */
protected onComponentMounted(): void;
/** Called when the element is removed from the DOM. */
protected onComponentUnmounted(): void;
}
export {};