UNPKG

taggedjs

Version:

tagged template reactive html

12 lines (11 loc) 693 B
import { ContextItem } from '../tag/index.js'; import { ElementFunction } from './ElementFunction.type.js'; type AttrFn = (item: any, args: [name: string | unknown, value?: any]) => any; export type AttributeCallable = { (strings: TemplateStringsArray, ...values: any[]): ElementFunction; (value: string | boolean | number): ElementFunction; (value: (context: ContextItem) => any): ElementFunction; }; export type AttrCallableInternal = (item: any, stringsOrValue: TemplateStringsArray | string | object | ((context: ContextItem) => any), values: any[]) => ElementFunction; export declare function makeAttrCallable(attrName: string, attr: AttrFn): AttrCallableInternal; export {};