UNPKG

@github/catalyst

Version:

Helpers for creating HTML Elements as Controllers

20 lines 1.2 kB
import { ReactiveController, ReactiveControllerHost } from './reactive-controller.js'; export interface Targetable { [targetChangedCallback](key: PropertyKey, target: Element): void; [targetsChangedCallback](key: PropertyKey, targets: Element[]): void; } export interface TargetableClass { new (): Targetable; } declare const targetChangedCallback: unique symbol; declare const targetsChangedCallback: unique symbol; declare const target: import("./mark.js").PropertyDecorator, getTarget: (instance: Element) => Set<PropertyKey>; declare const targets: import("./mark.js").PropertyDecorator, getTargets: (instance: Element) => Set<PropertyKey>; export { target, getTarget, targets, getTargets, targetChangedCallback, targetsChangedCallback }; export declare class TargetableController implements ReactiveController { host: ReactiveControllerHost & HTMLElement; constructor(host: ReactiveControllerHost & HTMLElement); hostShadowCreated(root: ShadowRoot): void; } export declare const targetable: <T extends import("./custom-element.js").CustomElementClass>(Class: T) => T & import("./reactive-controller.js").ReactiveControllerHostClass; //# sourceMappingURL=targetable.d.ts.map