@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
18 lines (17 loc) • 645 B
TypeScript
import type { ESLAttributeDecorator } from '../dom/attr';
/** HTML boolean (marker) attribute mapping configuration */
type BoolAttrDescriptor = {
/** HTML attribute name. Uses kebab-cased variable name by default */
name?: string;
/** Create getter only */
readonly?: boolean;
/** Use data-* attribute */
dataAttr?: boolean;
};
/**
* Decorator to map current property to element boolean (marker) attribute state.
* Maps boolean type property.
* @param config - mapping configuration. See {@link BoolAttrDescriptor}
*/
export declare const boolAttr: (config?: BoolAttrDescriptor) => ESLAttributeDecorator;
export {};