Pathologic was missing because of a .git folder inside.
[yaffs-website] / node_modules / min-document / docs.mli
1 type Comment := {
2     data: String,
3     length: Number,
4     nodeName: "#comment",
5     nodeType: 8,
6     nodeValue: String,
7     ownerDoucment: null | Document,
8
9     toString: (this: Comment) => String
10 }
11
12 type DOMText := {
13     data: String,
14     type: "DOMTextNode",
15     length: Number,
16     nodeType: 3,
17
18     toString: (this: DOMText) => String,
19     replaceChild: (
20         this: DOMText,
21         index: Number,
22         length: Number,
23         value: String
24     ) => void
25 }
26
27 type DOMNode := DOMText | DOMElement | DocumentFragment
28 type DOMChild := DOMText | DOMElement
29
30 type DOMElement := {
31     tagName: String,
32     className: String,
33     dataset: Object<String, Any>,
34     childNodes: Array<DOMChild>,
35     parentNode: null | DOMElement,
36     style: Object<String, String>,
37     type: "DOMElement",
38     nodeType: 1,
39     ownerDoucment: null | Document,
40     namespaceURI: null | String,
41
42     appendChild: (this: DOMElement, child: DOMChild) => DOMChild,
43     replaceChild:(
44         this: DOMElement,
45         elem: DOMChild,
46         needle: DOMChild
47     ) => DOMChild,
48     removeChild: (this: DOMElement, child: DOMChild) => DOMChild,
49     insertBefore: (
50         this: DOMElement,
51         elem: DOMChild,
52         needle: DOMChild | null | undefined
53     ) => DOMChild,
54     addEventListener: addEventListener,
55     dispatchEvent: dispatchEvent,
56     focus: () => void,
57     toString: (this: DOMElement) => String,
58     getElementsByClassName: (
59         this: DOMElement,
60         className: String
61     ) => Array<DOMElement>,
62     getElementsByTagName: (
63         this: DOMElement,
64         tagName: String
65     ) => Array<DOMElement>,
66 }
67
68 type DocumentFragment := {
69     childNodes: Array<DOMChild>,
70     parentNode: null | DOMElement,
71     type: "DocumentFragment",
72     nodeType: 11,
73     nodeName: "#document-fragment",
74     ownerDoucment: Document | null,
75
76     appendChild: (this: DocumentFragment, child: DOMChild),
77     replaceChild:
78         (this: DocumentFragment, elem: DOMChild, needle: DOMChild),
79     removeChild: (this: DocumentFragment, child: DOMChild),
80     toString: (this: DocumentFragment) => String
81 }
82
83 type Document := {
84     body: DOMElement,
85     childNodes: Array<DOMChild>,
86     documentElement: DOMElement,
87     nodeType: 9,
88
89     createComment: (this: Document, data: String) => Commment,
90     createTextNode: (this: Document, value: String) => DOMText,
91     createElement: (this: Document, tagName: String) => DOMElement,
92     createElementNS: (
93         this: Document,
94         namespace: String | null,
95         tagName: String
96     ) => DOMElement,
97     createDocumentFragment: (this: Document) => DocumentFragment,
98     createEvent: () => Event,
99     getElementById: (
100         this: Document,
101         id: String,
102     ) => null | DOMElement,
103     getElementsByClassName: (
104         this: Document,
105         className: String
106     ) => Array<DOMElement>,
107     getElementsByTagName: (
108         this: Document,
109         tagName: String
110     ) => Array<DOMElement>
111 }
112
113 type Event := {
114     type: String,
115     bubbles: Boolean,
116     cancelable: Boolean,
117
118     initEvent: (
119         this: Event,
120         type: String,
121         bubbles: Boolean,
122         cancelable: Boolean
123     ) => void
124 }
125
126 type addEventListener := (
127     this: DOMElement,
128     type: String,
129     listener: Listener
130 ) => void
131
132 type dispatchEvent := (
133     this: DOMElement,
134     ev: Event
135 )
136
137 min-document/event/add-event-listener := addEventListener
138
139 min-document/event/dispatch-event := dispatchEvent
140
141 min-document/document := () => Document
142
143 min-document/dom-element :=
144     (tagName: String, owner?: Document, namespace?: String | null) => DOMElement
145
146 min-document/dom-fragment :=
147     (owner?: Document) => DocumentFragment
148
149 min-document/dom-text :=
150     (value: String, owner?: Document) => DOMText
151
152 min-document/event := () => Event
153
154 min-document/serialize := (DOMElement) => String
155
156 min-document := Document