title: Share code between client and server in typescript
body: <p>So I found this post <a href="https://stackoverflow.com/questions/47521714/share-interfaces-between-separat-typescript-projects">Share interfaces between separat TypeScript projects</a> but it did not get a answer, I am facing the same problem now, I have a client, server and shared folder inside the root of my project, both client and server have a tsconfig in their roots and a src folder with typescript files, I would like to be able to import like </p>
  
  <pre class="lang-js prettyprint-override"><code>import { PromotionInterface } from '@shared/Promotion';
  </code></pre>
  
  <p>But using the tsconfig below it says that it can not find the module</p>
  
  <pre><code>{
    "compilerOptions": {
      "target": "es5",
      "lib": [
        "dom",
        "dom.iterable",
        "esnext"
      ],
      "allowJs": true,
      "skipLibCheck": true,
      "esModuleInterop": true,
      "allowSyntheticDefaultImports": true,
      "strict": true,
      "forceConsistentCasingInFileNames": true,
      "module": "esnext",
      "moduleResolution": "node",
      "rootDirs": [
        "src",
        "../shared"
      ],
      "paths": {
        "@shared/*": [
          "../shared/*"
        ]
      },
      "resolveJsonModule": true,
      "isolatedModules": true,
      "noEmit": true,
      "jsx": "preserve"
    },
    "include": [
      "src"
    ]
  }
  </code></pre>
  
  <p>Is there a way to make this work?</p>