title: Writing npm modules in TypeScript
body: <p>I am working on my first npm module. I briefly worked with TypeScript before and a big problem was that for many modules there were no definition files available. So I thought it would be a good idea to write my module in TypeScript.</p>
  <p>However, I can't find any information on the best way to do that. I found this related question &quot;<a href="https://stackoverflow.com/questions/13645824/can-i-write-npm-package-in-coffeescript">Can I write npm package in CoffeeScript?</a>&quot; where people suggest only publishing the JavaScript files. But in contrast to the CoffeeScript files, the TypeScript files might actually be useful if they are used within a TypeScript application.</p>
  <p>Should I include TypeScript files when publishing an npm module, or should I only publish the JavaScript files and provide the generated .d.ts files to DefinitelyTyped?</p>