/** * Gets, sets, or removes an attribute on a DOM element. * This is a type-safe wrapper around the native DOM attribute methods. * * @param element - The DOM element to operate on. * @param name - The name of the attribute to get, set, or remove. * @param value - The value to set for the attribute. If null, the attribute will be removed. * @returns The element's attribute value when getting, or the element itself when setting/removing. * @throws {TypeError} If element is not a valid DOM element or name is not a string. * @example * // Get an attribute * const style = attr(element, 'style'); * * // Set an attribute * attr(element, 'id', 'new-element-id'); * * // Remove an attribute * attr(element, 'data-temp', null); */ export declare function attr(element: Element, name: string, value?: string | null): string | null | Element;