declare global { interface JQuery { /** * @deprecated * @deprecated Removed since 1.41. */ tipsy: JQueryTipsy; } } type StringProvider = string | ((ctx: T) => string); type MethodsOf = { [P in keyof T]: T[P] extends (...args: unknown[]) => void ? P : never; }[keyof T]; type NSDirection = "n" | "s" | ""; type EWDirection = "e" | "w" | ""; type Direction = `${NSDirection}${EWDirection}`; interface JQueryTipsy { (options: true): Tipsy; (options?: MethodsOf | Options): JQuery; defaults: Required; /** * Yields a closure of the supplied parameters, producing a function that takes * no arguments and is suitable for use as an autogravity function like so: * * @param margin (int) - distance from the viewable region edge that an * element should be before setting its tooltip's gravity to be away * from that edge. * @param prefer (string, e.g. `n`, `sw`, `w`) - the direction to prefer * if there are no viewable region edges effecting the tooltip's * gravity. It will try to vary from this minimally, for example, * if `sw` is preferred and an element is near the right viewable * region edge, but not the top edge, it will set the gravity for * that element's tooltip to be `se`, preserving the southern * component. */ autoBounds(margin: number, prefer: Direction): Direction; autoNS(): boolean; autoWE(): boolean; elementOptions(ele: HTMLElement, options: T): T; } interface Options { center?: boolean; className?: StringProvider | null; delayIn?: number; delayOut?: number; fade?: boolean; fallback?: string; gravity?: StringProvider; html?: boolean; live?: boolean; offset?: number; opacity?: number; title?: StringProvider; trigger?: "hover" | "manual"; } interface Tipsy { $element: JQuery; enabled: boolean; options: Required; closeOnEsc(e: KeyboardEvent): void; getTitle(): string; fixTitle(): void; hide(): void; keyHandler(e: KeyboardEvent): void; show(): void; tip(): JQuery; validate(): void; } export {};