title: What recommendations exist for structuring TypeScript code bases?
body: <p>I have been working with C# for years and am mostly used to the single-file-per-type way of doing things. I am also fond of putting files into subfolders (corresponding to namespaces in C#).</p>
  
  <p>But now I'm building a mobile web application using TypeScript, and find myself structuring my code in much the same way. However, this doesn't work too well:</p>
  
  <ul>
  <li>Every file produces a module wrapper, so if you have many files with the same module the output (when bundled) contains a lot of unnecessary code lines.</li>
  <li>Referencing types in other modules is.. not as nice as in C#, as you have to prefix type names with module name.</li>
  </ul>
  
  <p>The first point should be fixable by writing a small tool to strip out unnecessary module wrappers from the bundled output. And I'm thinking that I need to avoid using sub-modules and just stick everything into a single module, regardless of file system location.</p>
  
  <p>Is there a better way to go about structuring TypeScript code than what I am currently doing/planning or would something like the above be recommend practice? What alternatives exist that are worth considering for someone who likes the single-responsibility principle?</p>
  
  <p>PS: I hope this falls within the guidelines of SO, despite possibly being a bit subjective and open-ended.</p>