UNPKG

element-vir

Version:

Heroic. Reactive. Declarative. Type safe. Web components without compromise.

23 lines (22 loc) 1.05 kB
import { type ObservableListener } from 'observavir'; import { type DeclarativeElement } from '../declarative-element.js'; import { type PropertyInitMapBase } from './element-properties.js'; /** * Used for a map of all observables registered to an element instance. * * @category Internal */ export type ObservableListenerMap<OriginalPropertyMap extends PropertyInitMapBase> = Partial<Record<keyof OriginalPropertyMap, ObservableListener<any> | undefined>>; /** * Binds the given property key as a reactive property on the given element. * * @category Internal */ export declare function bindReactiveProperty(element: HTMLElement, propertyKey: PropertyKey): void; /** * Creates an internal proxy for setting inputs and state properties and then updating them on the * element itself so they will trigger lit's change detection. * * @category Internal */ export declare function createElementPropertyProxy<PropertyInitGeneric extends PropertyInitMapBase>(element: DeclarativeElement, shouldAlreadyExist: boolean): PropertyInitGeneric;