npm i --save aem
class AEM.Component {
constructor(element: HTMLElement, attributes: HTMLElement.dataset): void,
init(): void
}
AEM.registerComponent(selector: string, ComponentClass: AEM.Component): void
import AEM from 'aem';
class Button extends AEM.Component {
init() {
this.element.addEventListener('click', e => {
alert('You clicked me!');
});
}
}
AEM.registerComponent('#my-button', Button);