Skip to content

@gluonjs/core / src / GluonElementHotUpdateResult

Interface: GluonElementHotUpdateResult<Constructor> ​

Type Parameters ​

Constructor ​

Constructor extends GluonElementClass

Properties ​

compatible ​

readonly compatible: boolean


constructor ​

readonly constructor: Constructor


reason? ​

readonly optional reason?: string

Example ​

Inspect the typed result returned by the Vite integration after applying a compatible element update:

ts
import {
  GluonElement,
  applyGluonElementHotUpdate,
  html,
  type GluonElementHotUpdateResult,
} from '@gluonjs/core';

class ProductCard extends GluonElement {
  protected render() {
    return html`<article>Product</article>`;
  }
}

const update: GluonElementHotUpdateResult<typeof ProductCard> =
  applyGluonElementHotUpdate('product-card', ProductCard);
console.log(update.compatible, update.reason);

Version-matched documentation. Examples are checked against the public package contracts.