File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1- import { CatalystDelegate } from './core.js'
21import type { CustomElementClass } from './custom-element.js'
2+ import { targetable } from './targetable.js'
33import { attrable } from './attrable.js'
44import { actionable } from './actionable.js'
5+ import { register } from './register.js'
56
67/**
78 * Controller is a decorator to be used over a class that extends HTMLElement.
89 * It will automatically `register()` the component in the customElement
910 * registry, as well as ensuring `bind(this)` is called on `connectedCallback`,
1011 * wrapping the classes `connectedCallback` method if needed.
1112 */
12- export function controller ( classObject : CustomElementClass ) : void {
13- new CatalystDelegate ( actionable ( attrable ( classObject ) ) )
13+ export function controller < T extends CustomElementClass > ( Class : T ) {
14+ return register ( actionable ( attrable ( targetable ( Class ) ) ) )
1415}
You can’t perform that action at this time.
0 commit comments