@gluonjs/core / src / GluonElementHotUpdateResult
Interface: GluonElementHotUpdateResult<Constructor>
Type Parameters
Constructor
Constructor extends GluonElementClass
Properties
compatible
readonlycompatible:boolean
constructor
readonlyconstructor:Constructor
reason?
readonlyoptionalreason?:string
Example
Inspect the typed result returned by the Vite integration after applying a compatible element update:
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);