I’ve been building node libraries for home automation purposes for a while now, see my repositories. I decided that it was time to try out the strong-type goodness you get when using Typescript.
Node-sonos (a library to control your sonos device, from you guessed it, node) was a good candidate. I’m one of the main contributors at this point. In the last two months I spend a lot of hours developing a comparable library in typescript. The result node-sonos-ts is now at version 1.1.1 so it’s a good moment to look back on the bumps in the road.
tsc. You’ll need to do some setup stuff, someone make a great tutorial. You can also have a look at the package.json and the tsconfig.json files in my new repository. In node-sonos-ts the files live in the src folder, and the get compiled (and released) from the lib folder.