-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev-types.d.ts
81 lines (65 loc) · 1.76 KB
/
dev-types.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import {
Signal,
Store,
} from './primitives/classes';
// These global types are used for the development of this project.
declare global {
type NixixElementType = HTMLElement | SVGElement;
type target =
| keyof HTMLElementTagNameMap
| keyof SVGElementTagNameMap
| ((props?: {} | null) => Element)
| 'fragment';
type Proptype = { children?: any; [index: string]: any } | null | undefined;
type ChildrenType = Array<Element | string | Signal>;
type ValueType = Signal | Store | string;
type StyleValueType = { [key: string]: ValueType };
type DynamicAttrType = {
element: HTMLElement | SVGElement;
attrPrefix: string;
attrName: string;
attrValue: ValueType;
};
type TypeOf =
| 'propertyAttribute'
| 'regularAttribute'
| 'styleProp'
| 'childTextNode';
interface Window {
$$__NixixStore?: {
commentForLF: boolean;
$$__routeStore?: {
errorPage?: {
errorRoute: string;
};
[path: string]: any;
};
};
}
var window: Window & typeof globalThis;
interface Current extends Element {}
interface MutableRefObject {
current: Current & object;
nextElementSibling: Element['nextElementSibling'] | null;
prevElementSibling: Element['previousElementSibling'] | null;
parent: Element['parentElement'] | null;
}
interface SuspenseProps {
fallback: any;
children?: Promise<any>[];
onError?: string | Element | Signal;
}
interface ForProps {
fallback: any;
children?: ((value: any, index?: number) => JSX.Element)[];
each: any[]
}
interface ShowProps {
when: () => boolean;
children: any;
fallback: any;
switch: Signal
}
// @ts-ignore
interface NixixNode extends Node, String, JSX.Element {}
}