-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathglobal.d.ts
More file actions
22 lines (20 loc) · 828 Bytes
/
Copy pathglobal.d.ts
File metadata and controls
22 lines (20 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* eslint-disable @typescript-eslint/no-explicit-any */
import { HtmxAttributes } from "typed-htmx";
import { ReactNode } from 'react';
declare global {
namespace JSX {
type Element = ReactNode;
interface HTMLAttributes extends HtmxAttributes {}
}
interface htmx {
defineExtension: (name: string, init: {
init: (api: any) => void;
onEvent: (name: string, event: Event | CustomEvent) => boolean;
transformResponse: (text: string, xhr: XMLHttpRequest, elt: Element) => string;
isInlineSwap: (swapStyle: HtmxSwapStyle) => boolean;
handleSwap: (swapStyle: HtmxSwapStyle, target: Node, fragment: Node, settleInfo: HtmxSettleInfo) => boolean | Node[];
encodeParameters: (xhr: XMLHttpRequest, parameters: FormData, elt: Node) => any | string | null;
getSelectors: () => string[] | null;
}) => void
}
}