element-vir
Version:
Heroic. Reactive. Declarative. Type safe. Web components without compromise.
29 lines (28 loc) • 1.17 kB
TypeScript
import { type PartInfo } from '../../lit-exports/all-lit-exports.js';
/**
* Creates a lit directive that used simply for setting attributes on its parent element.
*
* @category Internal
*/
export declare function createAttributeDirective(attributeName: string): {
/**
* Creates a string for use with the
* [`querySelector`](https://developer.mozilla.org/docs/Web/API/Document/querySelector) API
* that selects this directive's attribute set to the given `attributeValue`.
*/
attributeSelector(this: void, attributeValue: string): string;
/**
* Instantiates the attribute directive. This must be used on an element inside of an HTML
* template.
*/
attributeDirective(this: void, attributeValue: string): import("lit-html/directive.js").DirectiveResult<{
new (partInfo: PartInfo): {
readonly element: Element;
render(attributeValue: string): symbol;
readonly _$isConnected: boolean;
update(_part: import("lit-html").Part, props: Array<unknown>): unknown;
};
}>;
/** The name of the attribute used in the directive. */
attributeName: string;
};