/** * This file is used for internal type checking only. It should not be * referenced in public types of your package to not pollute the global types * namespace */ declare global { /** * This interface will be extended in each source file that defines a LitElement. * * @example * ```ts * declare global { * interface DeclareElements { * "arcgis-root": ArcgisRoot; * } * } * ``` */ export interface DeclareElements { } type ReMappedDeclareElements = { [TagName in keyof DeclareElements]: DeclareElements[TagName]["el"]; }; interface HTMLElementTagNameMap extends ReMappedDeclareElements { } } export interface DeclareElements extends globalThis.DeclareElements { } /** * In the component files, we declare "DeclareElements" interface on the * `declare global` namespace as it's shorter than writing * `declare module "@geoscene/lumina"`. However, we want to avoid polluting * global typings with this interface - thus we use namespace merging to * extend the namespaced DeclareElements based on the global DeclareElements. */ declare module "../jsx/types" { interface DeclareElements extends globalThis.DeclareElements { } }