import { SpecialAttribute, TwowayBinding } from "../type-utils.js" /** * Register a special attribute to be used in dynamic fragments. */ export function registerSpecialAttribute( name: `ff-${string}`, specification: SpecialAttribute ): Map> /** * Unregister a special attribute. */ export function unregisterSpecialAttribute(name: string): boolean /** * Creates a twoway binding which can be passed to the `ff-share` attribute. */ export function twoway( state: T, property: Key, toTransform?: ((fieldValue: TransformedType) => T[Key]), fromTransform?: ((stateValue: T[Key]) => TransformedType), effectContext?: unknown ): Twoway /** * Creates a ref which can be passed to `ff-ref`. Is used to get references to elements in the template. */ export function ref(type?: T): ElementReference export const specialAttributes: Map> declare class Twoway implements TwowayBinding { constructor(state: object, property: string | number | symbol, toTransform?: ((value: TransformedType) => ValueType) | null, fromTransform?: ((value: ValueType) => TransformedType) | null, effectContext?: unknown) get(): TransformedType set(newValue: TransformedType): void withEffect(effect: (newValue: TransformedType) => void): this } declare class ElementReference Element> { constructor(type?: T) set element(element: InstanceType | null) get element(): InstanceType | null get elementOrThrow(): InstanceType }