title: How to consume declarations from declaratoinDir in an another project
body: <p><a href="https://github.com/microsoft/TypeScript/issues/43500" rel="nofollow noreferrer">https://github.com/microsoft/TypeScript/issues/43500</a></p>
  <p>We have several projects some of them written on JavaScript some on TypeScript. To share code between projects we have &quot;common&quot; library written on JavaScript. But for TypeScript projects we want to provide type declarations based on JSDoc compiled to d.ts.</p>
  <p>We can easily generate d.ts files based on JSDoc, but we want to keep them in a separate folder (<strong>We don't want to put .d.ts files near js files</strong>). TypeScript provide options for that <code>declaratoinDir</code>. Problem how to consume this type declarations in projects which use &quot;common&quot; library?</p>
  <p>Structure of shipped &quot;common&quot; library</p>
  <pre><code>common/foo/foo.js
  common/types/foo/foo.d.ts
  </code></pre>
  <p>Currently, if import &quot;common/foo/foo&quot; in TypeScript project we get error that we don't have d.ts file for this module</p>
  <p>Thanks</p>