title: What to put in package.json types field for typescript based libs
body: <p>I'm a bit confused as to how best develop multiple typescript modules in parallel with code navigation and still publishing the right way. So what should I really put in package.json "types" field?</p>
  
  <p>According to: <a href="https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html" rel="noreferrer">Typescriptlang.org/publishing.html</a></p>
  
  <p>I should put a reference to my generated <code>index.d.ts</code> like so:</p>
  
  <pre><code>{
      "name": "awesome",
      "author": "Vandelay Industries",
      "version": "1.0.0",
      "main": "./lib/main.js",
      "types": "./lib/main.d.ts"
  }
  </code></pre>
  
  <p>If I then develop a module in parallel that depends on this one with <code>npm link</code>, code navigation in for example vscode makes me just jump into this definitions file. Which is not what I want. </p>
  
  <p>I want to go into the source file to be able to edit in the dep in parallel. No tsconfig setting with sourcemaps, inlined or not have helped in this regard. I might be missing something here. The only way I've managed my work flow to work decently is to actually point to the source main.ts file instead:</p>
  
  <pre><code>{
      "name": "awesome",
      "author": "Vandelay Industries",
      "version": "1.0.0",
      "main": "./lib/main.js",
      "types": "./src/main.ts"
  }
  </code></pre>
  
  <p>That however would make thing break when published right ? </p>
  
  <p>At least if I put src under .npmignore. I'm failing to understand the best way to have a nice workflow with multiple typescript modules. </p>
  
  <p>I mean, I wouldn't want to have to mangle package.json as part of release process…?</p>