UNPKG

better-react-web-component

Version:
19 lines (18 loc) 752 B
/// <reference types="react" /> import { type Root } from "react-dom/client"; import type { CustomHTMLModel } from "./custom-html-model.ts"; export type ReactComponent = ((props: any) => JSX.Element) & { types?: Record<string, number>; }; export declare class CustomElementTemplate extends HTMLElement { rootDiv?: HTMLDivElement; rootElement?: HTMLElement | ShadowRoot; __reactRoot?: Root; static domModel: CustomHTMLModel; static ReactComponent: ReactComponent; static renderRoot: "shadowRoot" | "shadowRootClosed" | "container" | "element"; connectedCallback(): void; renderCustomElement(): void; disconnectedCallback(): void; attributeChangedCallback(_name: string, oldValue: any, newValue: any): void; }