UNPKG

27.2 kBTypeScriptView Raw
1/** Renders a vnode structure into a DOM element. */
2declare function render(el: Element, vnodes: Mithril.Children): void;
3
4/** Mounts a component to a DOM element, enabling it to autoredraw on user events. */
5declare function mount(element: Element, component: Mithril.ComponentTypes<any, any>): void;
6/** Unmounts a component from a DOM element. */
7declare function mount(element: Element, component: null): void; // tslint:disable-line unified-signatures
8
9/** Returns a shallow-cloned object with lifecycle attributes and any given custom attributes omitted. */
10declare function censor<
11 O extends Record<string, any>,
12 E extends Readonly<string[]>,
13>(object: O, extra: E): Omit<Mithril._NoLifecycle<O>, E[number]>;
14
15/** Makes an XHR request and returns a promise. */
16declare function request<T>(options: Mithril.RequestOptions<T> & { url: string }): Promise<T>;
17/** Makes an XHR request and returns a promise. */
18declare function request<T>(url: string, options?: Mithril.RequestOptions<T>): Promise<T>;
19
20/** Makes a JSON-P request and returns a promise. */
21declare function jsonp<T>(options: Mithril.JsonpOptions & { url: string }): Promise<T>; // eslint-disable-line @definitelytyped/no-unnecessary-generics
22/** Makes a JSON-P request and returns a promise. */
23declare function jsonp<T>(url: string, options?: Mithril.JsonpOptions): Promise<T>; // eslint-disable-line @definitelytyped/no-unnecessary-generics
24
25declare namespace Mithril {
26 interface CommonAttributes<Attrs, State> {
27 /** The oninit hook is called before a vnode is touched by the virtual DOM engine. */
28 oninit?(this: State, vnode: Vnode<Attrs, State>): any;
29 /** The oncreate hook is called after a DOM element is created and attached to the document. */
30 oncreate?(this: State, vnode: VnodeDOM<Attrs, State>): any;
31 /** The onbeforeremove hook is called before a DOM element is detached from the document. If a Promise is returned, Mithril only detaches the DOM element after the promise completes. */
32 // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
33 onbeforeremove?(this: State, vnode: VnodeDOM<Attrs, State>): Promise<any> | void;
34 /** The onremove hook is called before a DOM element is removed from the document. */
35 onremove?(this: State, vnode: VnodeDOM<Attrs, State>): any;
36 /** The onbeforeupdate hook is called before a vnode is diffed in a update. */
37 // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
38 onbeforeupdate?(this: State, vnode: Vnode<Attrs, State>, old: VnodeDOM<Attrs, State>): boolean | void;
39 /** The onupdate hook is called after a DOM element is updated, while attached to the document. */
40 onupdate?(this: State, vnode: VnodeDOM<Attrs, State>): any;
41 /** A key to optionally associate with this element. */
42 key?: string | number | undefined;
43 }
44
45 interface Hyperscript {
46 /** Creates a virtual element (Vnode). */
47 <Attrs, State>(
48 component: ComponentTypes<Attrs, State>,
49 attributes: Attrs & CommonAttributes<Attrs, State>,
50 ...args: Children[]
51 ): Vnode<Attrs, State>;
52 /** Creates a virtual element (Vnode). */
53 (selector: string, attributes: Attributes, ...children: Children[]): Vnode<any, any>;
54 /** Creates a virtual element (Vnode). */
55 <Attrs, State>(component: ComponentTypes<Attrs, State>, ...args: Children[]): Vnode<Attrs, State>;
56 /** Creates a virtual element (Vnode). */
57 (selector: string, ...children: Children[]): Vnode<any, any>;
58 /** Creates a fragment virtual element (Vnode). */
59 fragment(
60 attrs: CommonAttributes<any, any> & { [key: string]: any },
61 children: ChildArrayOrPrimitive,
62 ): Vnode<any, any>;
63 /** Turns an HTML string into a virtual element (Vnode). Do not use trust on unsanitized user input. */
64 trust(html: string): Vnode<any, any>;
65 }
66
67 interface RouteResolver<Attrs = {}, State = {}> {
68 /** The onmatch hook is called when the router needs to find a component to render. */
69 onmatch?(
70 this: this,
71 args: Attrs,
72 requestedPath: string,
73 route: string,
74 // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
75 ): ComponentTypes<any, any> | Promise<any> | void;
76 /** The render method is called on every redraw for a matching route. */
77 render?(this: this, vnode: Vnode<Attrs, State>): Children;
78 }
79
80 /** This represents a key-value mapping linking routes to components. */
81 interface RouteDefs {
82 /** The key represents the route. The value represents the corresponding component. */
83 [url: string]: ComponentTypes<any, any> | RouteResolver<any, any>;
84 }
85
86 interface RouteOptions {
87 /** Routing parameters. If path has routing parameter slots, the properties of this object are interpolated into the path string. */
88 replace?: boolean | undefined;
89 /** The state object to pass to the underlying history.pushState / history.replaceState call. */
90 state?: any;
91 /** The title string to pass to the underlying history.pushState / history.replaceState call. */
92 title?: string | undefined;
93 }
94
95 interface RouteLinkAttrs extends Attributes {
96 href: string;
97 selector?: string | ComponentTypes<any> | undefined;
98 options?: RouteOptions | undefined;
99 }
100
101 interface Route {
102 /** Creates application routes and mounts Components and/or RouteResolvers to a DOM element. */
103 (element: Element, defaultRoute: string, routes: RouteDefs): void;
104 /** Returns the last fully resolved routing path, without the prefix. */
105 get(): string;
106 /** Redirects to a matching route or to the default route if no matching routes can be found. */
107 set(route: string, data?: any, options?: RouteOptions): void;
108 /** Defines a router prefix which is a fragment of the URL that dictates the underlying strategy used by the router. */
109 prefix: string;
110 /** This Component renders a link <a href> that will use the current routing strategy */
111 Link: Component<RouteLinkAttrs>;
112 /** Returns the named parameter value from the current route. */
113 param(name: string): string;
114 /** Gets all route parameters. */
115 param(): any;
116 /** Special value to SKIP current route */
117 SKIP: any;
118 }
119
120 interface RequestOptions<T> {
121 /** The HTTP method to use. */
122 method?: string | undefined;
123 /** The data to be interpolated into the URL and serialized into the querystring. */
124 params?: { [key: string]: any } | undefined;
125 /** The data to be serialized into the request body. */
126 body?:
127 | (XMLHttpRequest["send"] extends (x: infer R) => any ? R : never)
128 | (object & { [id: string]: any })
129 | undefined;
130 /** Whether the request should be asynchronous. Defaults to true. */
131 async?: boolean | undefined;
132 /** A username for HTTP authorization. */
133 user?: string | undefined;
134 /** A password for HTTP authorization. */
135 password?: string | undefined;
136 /** Whether to send cookies to 3rd party domains. */
137 withCredentials?: boolean | undefined;
138 /** Exposes the underlying XMLHttpRequest object for low-level configuration. */
139 // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
140 config?(xhr: XMLHttpRequest, options: this): XMLHttpRequest | void;
141 /** Headers to append to the request before sending it. */
142 headers?: { [key: string]: string } | undefined;
143 /** A constructor to be applied to each object in the response. */
144 type?: new(o: any) => any;
145 /** A serialization method to be applied to data. Defaults to JSON.stringify, or if options.data is an instance of FormData, defaults to the identity function. */
146 serialize?(data: any): any;
147 /** A deserialization method to be applied to the response. Defaults to a small wrapper around JSON.parse that returns null for empty responses. */
148 deserialize?(data: string): T;
149 /** A hook to specify how the XMLHttpRequest response should be read. Useful for reading response headers and cookies. Defaults to a function that returns xhr.responseText */
150 extract?(xhr: XMLHttpRequest, options: this): T;
151 /**
152 * Force the use of the HTTP body section for data in GET requests when set to true,
153 * or the use of querystring for other HTTP methods when set to false.
154 * Defaults to false for GET requests and true for other methods.
155 */
156 useBody?: boolean | undefined;
157 /** If false, redraws mounted components upon completion of the request. If true, it does not. */
158 background?: boolean | undefined;
159 /** Milliseconds a request can take before automatically being terminated. */
160 timeout?: number | undefined;
161 /** The expected type of the response, as a legal value of XMLHttpRequest.responseType. */
162 responseType?: "" | "arraybuffer" | "blob" | "document" | "json" | "text" | undefined;
163 }
164
165 interface JsonpOptions {
166 /** The data to be interpolated into the URL and serialized into the querystring. */
167 params?: { [id: string]: any } | undefined;
168 /** The data to be serialized into the request body. */
169 body?: any;
170 /** A constructor to be applied to each object in the response. */
171 type?: new(o: any) => any;
172 /** The name of the function that will be called as the callback. */
173 callbackName?: string | undefined;
174 /** The name of the querystring parameter name that specifies the callback name. */
175 callbackKey?: string | undefined;
176 /** If false, redraws mounted components upon completion of the request. If true, it does not. */
177 background?: boolean | undefined;
178 }
179
180 interface Redraw {
181 /** Manually triggers an asynchronous redraw of mounted components. */
182 (): void;
183 /** Manually triggers a synchronous redraw of mounted components. */
184 sync(): void;
185 }
186
187 type Params = object & ParamsRec;
188
189 interface ParamsRec {
190 // Ideally, it'd be this:
191 // `[key: string | number]: Params | !symbol & !object`
192 [key: string]: string | number | boolean | null | undefined | Params;
193 }
194
195 interface Static extends Hyperscript {
196 censor: typeof censor;
197 route: Route;
198 mount: typeof mount;
199 render: typeof render;
200 redraw: Redraw;
201 request: typeof request;
202 jsonp: typeof jsonp;
203 /** Returns an object with key/value pairs parsed from a string of the form: ?a=1&b=2 */
204 parseQueryString(queryString: string): Params;
205 /** Turns the key/value pairs of an object into a string of the form: a=1&b=2 */
206 buildQueryString(values: Params): string;
207 /** Parse path name */
208 parsePathname(url: string): { path: string; params: Params };
209 /** Build path name */
210 buildPathname(template: string, params?: Params): string;
211 }
212
213 // Vnode children types
214 type Child = Vnode<any, any> | string | number | boolean | null | undefined;
215 interface ChildArray extends Array<Children> {}
216 type Children = Child | ChildArray;
217 type ChildArrayOrPrimitive = ChildArray | string | number | boolean;
218
219 /** Virtual DOM nodes, or vnodes, are Javascript objects that represent an element (or parts of the DOM). */
220 interface Vnode<Attrs = {}, State = {}> {
221 /** The nodeName of a DOM element. It may also be the string [ if a vnode is a fragment, # if it's a text vnode, or < if it's a trusted HTML vnode. Additionally, it may be a component. */
222 tag: string | ComponentTypes<Attrs, State>;
223 /** A hashmap of DOM attributes, events, properties and lifecycle methods. */
224 attrs: Attrs;
225 /** An object that is persisted between redraws. In component vnodes, state is a shallow clone of the component object. */
226 state: State;
227 /** The value used to map a DOM element to its respective item in an array of data. */
228 key?: string | number | undefined;
229 /** In most vnode types, the children property is an array of vnodes. For text and trusted HTML vnodes, The children property is either a string, a number or a boolean. */
230 children?: ChildArrayOrPrimitive | undefined;
231 /**
232 * This is used instead of children if a vnode contains a text node as its only child.
233 * This is done for performance reasons.
234 * Component vnodes never use the text property even if they have a text node as their only child.
235 */
236 text?: string | number | boolean | undefined;
237 }
238
239 // In some lifecycle methods, Vnode will have a dom property
240 // and possibly a domSize property.
241 interface VnodeDOM<Attrs = {}, State = {}> extends Vnode<Attrs, State> {
242 /** Points to the element that corresponds to the vnode. */
243 dom: Element;
244 /** This defines the number of DOM elements that the vnode represents (starting from the element referenced by the dom property). */
245 domSize?: number | undefined;
246 }
247
248 type _NoLifecycle<T> = Omit<T, keyof Component>;
249
250 interface CVnode<A = {}> extends Vnode<A, ClassComponent<A>> {}
251
252 interface CVnodeDOM<A = {}> extends VnodeDOM<A, ClassComponent<A>> {}
253
254 /**
255 * Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse.
256 * Any Javascript object that has a view method can be used as a Mithril component.
257 * Components can be consumed via the m() utility.
258 */
259 interface Component<Attrs = {}, State = {}> {
260 /** The oninit hook is called before a vnode is touched by the virtual DOM engine. */
261 oninit?(this: _NoLifecycle<this & State>, vnode: Vnode<Attrs, _NoLifecycle<this & State>>): any;
262 /** The oncreate hook is called after a DOM element is created and attached to the document. */
263 oncreate?(this: _NoLifecycle<this & State>, vnode: VnodeDOM<Attrs, _NoLifecycle<this & State>>): any;
264 /** The onbeforeremove hook is called before a DOM element is detached from the document. If a Promise is returned, Mithril only detaches the DOM element after the promise completes. */
265 onbeforeremove?(
266 this: _NoLifecycle<this & State>,
267 vnode: VnodeDOM<Attrs, _NoLifecycle<this & State>>,
268 // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
269 ): Promise<any> | void;
270 /** The onremove hook is called before a DOM element is removed from the document. */
271 onremove?(this: _NoLifecycle<this & State>, vnode: VnodeDOM<Attrs, _NoLifecycle<this & State>>): any;
272 /** The onbeforeupdate hook is called before a vnode is diffed in a update. */
273 onbeforeupdate?(
274 this: _NoLifecycle<this & State>,
275 vnode: Vnode<Attrs, _NoLifecycle<this & State>>,
276 old: VnodeDOM<Attrs, _NoLifecycle<this & State>>,
277 // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
278 ): boolean | void;
279 /** The onupdate hook is called after a DOM element is updated, while attached to the document. */
280 onupdate?(this: _NoLifecycle<this & State>, vnode: VnodeDOM<Attrs, _NoLifecycle<this & State>>): any;
281 /** Creates a view out of virtual elements. */
282 // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
283 view(this: _NoLifecycle<this & State>, vnode: Vnode<Attrs, _NoLifecycle<this & State>>): Children | null | void;
284 }
285
286 /**
287 * Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse.
288 * Any class that implements a view method can be used as a Mithril component.
289 * Components can be consumed via the m() utility.
290 */
291 interface ClassComponent<A = {}> {
292 /** The oninit hook is called before a vnode is touched by the virtual DOM engine. */
293 oninit?(vnode: Vnode<A, this>): any;
294 /** The oncreate hook is called after a DOM element is created and attached to the document. */
295 oncreate?(vnode: VnodeDOM<A, this>): any;
296 /** The onbeforeremove hook is called before a DOM element is detached from the document. If a Promise is returned, Mithril only detaches the DOM element after the promise completes. */
297 // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
298 onbeforeremove?(vnode: VnodeDOM<A, this>): Promise<any> | void;
299 /** The onremove hook is called before a DOM element is removed from the document. */
300 onremove?(vnode: VnodeDOM<A, this>): any;
301 /** The onbeforeupdate hook is called before a vnode is diffed in a update. */
302 // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
303 onbeforeupdate?(vnode: Vnode<A, this>, old: VnodeDOM<A, this>): boolean | void;
304 /** The onupdate hook is called after a DOM element is updated, while attached to the document. */
305 onupdate?(vnode: VnodeDOM<A, this>): any;
306 /** Creates a view out of virtual elements. */
307 // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
308 view(vnode: Vnode<A, this>): Children | null | void;
309 }
310
311 /**
312 * Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse.
313 * Any function that returns an object with a view method can be used as a Mithril component.
314 * Components can be consumed via the m() utility.
315 */
316 type FactoryComponent<A = {}> = (vnode: Vnode<A>) => Component<A>;
317
318 /**
319 * Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse.
320 * Any function that returns an object with a view method can be used as a Mithril component.
321 * Components can be consumed via the m() utility.
322 */
323 type ClosureComponent<A = {}> = FactoryComponent<A>;
324
325 /**
326 * Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse.
327 * Any Javascript object that has a view method is a Mithril component. Components can be consumed via the m() utility.
328 */
329 type Comp<Attrs = {}, State = {}> = _NoLifecycle<State> & Component<Attrs, _NoLifecycle<State>>;
330
331 /** Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse. Components can be consumed via the m() utility. */
332 type ComponentTypes<A = {}, S = {}> =
333 | Component<A, S>
334 | { new(vnode: CVnode<A>): ClassComponent<A> }
335 | FactoryComponent<A>;
336
337 /** This represents the attributes available for configuring virtual elements, beyond the applicable DOM attributes. */
338 interface Attributes extends CommonAttributes<any, any> {
339 /** The class name(s) for this virtual element, as a space-separated list. */
340 className?: string | undefined;
341 /** The class name(s) for this virtual element, as a space-separated list. */
342 class?: string | undefined;
343 /** Any other virtual element properties, including attributes and event handlers. */
344 [property: string]: any;
345 }
346}
347
348declare global {
349 namespace JSX {
350 // eslint-disable-next-line @typescript-eslint/no-empty-interface
351 interface Element extends Mithril.Vnode {}
352
353 // eslint-disable-next-line @typescript-eslint/no-empty-interface
354 interface IntrinsicAttributes extends Mithril.Attributes {
355 children?: Mithril.Children | HTMLCollection;
356 }
357 // eslint-disable-next-line @typescript-eslint/no-empty-interface
358 interface IntrinsicClassAttributes extends Mithril.Attributes {}
359
360 interface IntrinsicElements {
361 // HTML
362 a: Mithril.Attributes;
363 abbr: Mithril.Attributes;
364 address: Mithril.Attributes;
365 area: Mithril.Attributes;
366 article: Mithril.Attributes;
367 aside: Mithril.Attributes;
368 audio: Mithril.Attributes;
369 b: Mithril.Attributes;
370 base: Mithril.Attributes;
371 bdi: Mithril.Attributes;
372 bdo: Mithril.Attributes;
373 big: Mithril.Attributes;
374 blockquote: Mithril.Attributes;
375 body: Mithril.Attributes;
376 br: Mithril.Attributes;
377 button: Mithril.Attributes;
378 canvas: Mithril.Attributes;
379 caption: Mithril.Attributes;
380 cite: Mithril.Attributes;
381 code: Mithril.Attributes;
382 col: Mithril.Attributes;
383 colgroup: Mithril.Attributes;
384 data: Mithril.Attributes;
385 datalist: Mithril.Attributes;
386 dd: Mithril.Attributes;
387 del: Mithril.Attributes;
388 details: Mithril.Attributes;
389 dfn: Mithril.Attributes;
390 dialog: Mithril.Attributes;
391 div: Mithril.Attributes;
392 dl: Mithril.Attributes;
393 dt: Mithril.Attributes;
394 em: Mithril.Attributes;
395 embed: Mithril.Attributes;
396 fieldset: Mithril.Attributes;
397 figcaption: Mithril.Attributes;
398 figure: Mithril.Attributes;
399 footer: Mithril.Attributes;
400 form: Mithril.Attributes;
401 h1: Mithril.Attributes;
402 h2: Mithril.Attributes;
403 h3: Mithril.Attributes;
404 h4: Mithril.Attributes;
405 h5: Mithril.Attributes;
406 h6: Mithril.Attributes;
407 head: Mithril.Attributes;
408 header: Mithril.Attributes;
409 hgroup: Mithril.Attributes;
410 hr: Mithril.Attributes;
411 html: Mithril.Attributes;
412 i: Mithril.Attributes;
413 iframe: Mithril.Attributes;
414 img: Mithril.Attributes;
415 input: Mithril.Attributes;
416 ins: Mithril.Attributes;
417 kbd: Mithril.Attributes;
418 keygen: Mithril.Attributes;
419 label: Mithril.Attributes;
420 legend: Mithril.Attributes;
421 li: Mithril.Attributes;
422 link: Mithril.Attributes;
423 main: Mithril.Attributes;
424 map: Mithril.Attributes;
425 mark: Mithril.Attributes;
426 menu: Mithril.Attributes;
427 menuitem: Mithril.Attributes;
428 meta: Mithril.Attributes;
429 meter: Mithril.Attributes;
430 nav: Mithril.Attributes;
431 noindex: Mithril.Attributes;
432 noscript: Mithril.Attributes;
433 object: Mithril.Attributes;
434 ol: Mithril.Attributes;
435 optgroup: Mithril.Attributes;
436 option: Mithril.Attributes;
437 output: Mithril.Attributes;
438 p: Mithril.Attributes;
439 param: Mithril.Attributes;
440 picture: Mithril.Attributes;
441 pre: Mithril.Attributes;
442 progress: Mithril.Attributes;
443 q: Mithril.Attributes;
444 rp: Mithril.Attributes;
445 rt: Mithril.Attributes;
446 ruby: Mithril.Attributes;
447 s: Mithril.Attributes;
448 samp: Mithril.Attributes;
449 script: Mithril.Attributes;
450 section: Mithril.Attributes;
451 select: Mithril.Attributes;
452 small: Mithril.Attributes;
453 source: Mithril.Attributes;
454 span: Mithril.Attributes;
455 strong: Mithril.Attributes;
456 style: Mithril.Attributes;
457 sub: Mithril.Attributes;
458 summary: Mithril.Attributes;
459 sup: Mithril.Attributes;
460 table: Mithril.Attributes;
461 template: Mithril.Attributes;
462 tbody: Mithril.Attributes;
463 td: Mithril.Attributes;
464 textarea: Mithril.Attributes;
465 tfoot: Mithril.Attributes;
466 th: Mithril.Attributes;
467 thead: Mithril.Attributes;
468 time: Mithril.Attributes;
469 title: Mithril.Attributes;
470 tr: Mithril.Attributes;
471 track: Mithril.Attributes;
472 u: Mithril.Attributes;
473 ul: Mithril.Attributes;
474 var: Mithril.Attributes;
475 video: Mithril.Attributes;
476 wbr: Mithril.Attributes;
477 webview: Mithril.Attributes;
478
479 // SVG
480 svg: Mithril.Attributes;
481 animate: Mithril.Attributes;
482 animateMotion: Mithril.Attributes;
483 animateTransform: Mithril.Attributes;
484 circle: Mithril.Attributes;
485 clipPath: Mithril.Attributes;
486 defs: Mithril.Attributes;
487 desc: Mithril.Attributes;
488 ellipse: Mithril.Attributes;
489 feBlend: Mithril.Attributes;
490 feColorMatrix: Mithril.Attributes;
491 feComponentTransfer: Mithril.Attributes;
492 feComposite: Mithril.Attributes;
493 feConvolveMatrix: Mithril.Attributes;
494 feDiffuseLighting: Mithril.Attributes;
495 feDisplacementMap: Mithril.Attributes;
496 feDistantLight: Mithril.Attributes;
497 feDropShadow: Mithril.Attributes;
498 feFlood: Mithril.Attributes;
499 feFuncA: Mithril.Attributes;
500 feFuncB: Mithril.Attributes;
501 feFuncG: Mithril.Attributes;
502 feFuncR: Mithril.Attributes;
503 feGaussianBlur: Mithril.Attributes;
504 feImage: Mithril.Attributes;
505 feMerge: Mithril.Attributes;
506 feMergeNode: Mithril.Attributes;
507 feMorphology: Mithril.Attributes;
508 feOffset: Mithril.Attributes;
509 fePointLight: Mithril.Attributes;
510 feSpecularLighting: Mithril.Attributes;
511 feSpotLight: Mithril.Attributes;
512 feTile: Mithril.Attributes;
513 feTurbulence: Mithril.Attributes;
514 filter: Mithril.Attributes;
515 foreignObject: Mithril.Attributes;
516 g: Mithril.Attributes;
517 image: Mithril.Attributes;
518 line: Mithril.Attributes;
519 linearGradient: Mithril.Attributes;
520 marker: Mithril.Attributes;
521 mask: Mithril.Attributes;
522 metadata: Mithril.Attributes;
523 mpath: Mithril.Attributes;
524 path: Mithril.Attributes;
525 pattern: Mithril.Attributes;
526 polygon: Mithril.Attributes;
527 polyline: Mithril.Attributes;
528 radialGradient: Mithril.Attributes;
529 rect: Mithril.Attributes;
530 stop: Mithril.Attributes;
531 switch: Mithril.Attributes;
532 symbol: Mithril.Attributes;
533 text: Mithril.Attributes;
534 textPath: Mithril.Attributes;
535 tspan: Mithril.Attributes;
536 use: Mithril.Attributes;
537 view: Mithril.Attributes;
538
539 // Special Mithril types
540 "[": Mithril.Attributes;
541 }
542 }
543}
544
545declare const Mithril: Mithril.Static;
546export = Mithril;