forked from sveltejs/language-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte-native-jsx.d.ts
34 lines (27 loc) · 1.06 KB
/
svelte-native-jsx.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* eslint @typescript-eslint/no-unused-vars: off */
declare namespace svelteNative.JSX {
// Every namespace eligible for use needs to implement the following two functions
function mapElementTag(
tag: string
): any;
function createElement<Elements extends IntrinsicElements, Key extends keyof Elements>(
element: Key | undefined | null, attrs: Elements[Key]
): any;
function createElement<Elements extends IntrinsicElements, Key extends keyof Elements, T>(
element: Key | undefined | null, attrEnhancers: T, attrs: Elements[Key] & T
): any;
/* svelte specific */
interface ElementClass {
$$prop_def: any;
}
interface ElementAttributesProperty {
$$prop_def: any; // specify the property name to use
}
// Add empty IntrinsicAttributes to prevent fallback to the one in the JSX namespace
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface IntrinsicAttributes {
}
interface IntrinsicElements {
[name: string]: { [name: string]: any };
}
}