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.