Maquette loves Typescript

Johan Gorter
Jul 15, 2015 · 2 min read

We recently gained some experience using Maquette with Typescript. We were very impressed by how well Typescript is supported by IDE’s and how well it integrates with NodeJS build tooling.

During the making of a Typescript definition file for Maquette we discovered how natural Typescript works with Maquette. We never had to use any or Object as a parameter or return value in the API. This is because, unlike other popular frontend frameworks, Maquette does not use untyped objects like state bags or contexts.

We have taken the screenshots below to demonstrate the level of autocompletion that Visual Studio Code (a free cross platform IDE) can provide when writing code using the maquette API. Other IDE’s, like IntelliJ and Visual Studio provide the same kind of autocompletion. The Typescript compiler can also be used from build scripts of course.

We created a small demonstration of a Maquette application written in entirely in Typescript. It is almost identical to the Javascript version, but now everything gets type-checked by the compiler. The only typecast we needed was one from to HTMLInputElement to read the value. We have put the code on GitHub for everyone to review and comment on.

Source code on GitHub

We hope you are just as impressed as we are.

Originally published at on July 15, 2015.

Maquette news

News from

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store