## Tools ### HTML-to-Mithril Template Converter If you already have your HTML written and want to convert it into a Mithril template, you can use the tool below for one-off manual conversion. [Template Converter](tools/template-converter.html) --- ### Automatic HTML-to-Mithril Template Converter There's a tool called [MSX by Jonathan Buchanan](https://github.com/insin/msx) that allows you to write templates using HTML syntax, and then automatically compile them to Javascript when files change. It is useful for teams where styling and functionality are done by different people, and for those who prefer to maintain templates in HTML syntax. The tool allows you to write code like this: ```javascript todo.view = function() { return
}; ``` Note, however, that since the code above is not valid Javascript, this syntax can only be used with a preprocessor build tool such as the provided [Gulp.js](http://gulpjs.com) script. This tool is also available as a [Rails gem](https://github.com/mrsweaters/mithril-rails), created by Jordan Humphreys. --- ### Mithril Template Compiler You can pre-compile Mithril templates to make them run faster. For more information see this page: [Compiling Templates](optimizing-performance.md#compiling-templates) --- ### Typescript Support There's a type definition file that you can use to add Mithril support to Typescript [mithril.d.ts](mithril.d.ts) You can use it by adding a reference to your Typescript files. This will allow the compiler to type-check calls to the Mithril API. ```javascript ///