title: Typescript declaration file created with alias instead of relative path
body: <p>Edit 1: Added GitHub URL to project</p>
  
  <p>Edit 2: Removing <code>baseUrl</code> from <code>tsconfig.json</code> fixes all problems and using relative imports works fine.</p>
  
  <p>Link: <a href="https://github.com/hisivasankar/typescript-issue/blob/master/build/typings/src/utils/geometry-types.d.ts" rel="noreferrer">Github</a></p>
  
  <p>How do I generate a typescript declaration file with relative paths instead of <code>alias</code>?</p>
  
  <p>I am creating a library(samplelibrary) in UMD mode and publishing it in npm. The packed npm library has only <code>build</code> folder(with typings), <code>package.json</code> and <code>README.md</code></p>
  
  <p>When I try to consume the library in another typescript app, the build fails due to invalid type declaration file which is being generated. The type declaration file contains alias instead of relative path. </p>
  
  <p>Compilation log:</p>
  
  <p><code>ERROR in /workspace/myproject/node_modules/samplelibrary/build/typings/src/foo.d.ts(403,17):</code>
  <code>TS2307: Cannot find module 'utils/bar</code></p>
  
  <p>How to fix this problem?</p>
  
  <p>Actually created declaration file foo.d.ts:</p>
  
  <pre><code>declare const Foo: {
     bar: typeof import("utils/bar");
  }
  </code></pre>
  
  <p>Expected file: </p>
  
  <pre><code>declare const Foo: {
     bar: typeof import("./utils/bar");
  }
  </code></pre>
  
  <p>tsconfig.json</p>
  
  <pre><code>{
    "compilerOptions": {
      "target": "es5",
      "module": "esnext",
      "moduleResolution": "node",
      "jsx": "react",
      "sourceMap": true,
      "rootDir": "./",
      "baseUrl": "./src",
      "paths": {
        "@samplecompany/sampleproject": ["./"]
      },
      "outDir": "build",
      "removeComments": true,
      "noImplicitAny": true,
      "noImplicitReturns": true,
      "noImplicitThis": true,
      "strictNullChecks": true,
      "declaration": true,
      "declarationDir": "typings",
      "importHelpers": true
    },
    "files": ["types/untyped-modules.d.ts"],
    "include": [
      "src/**/*",
      "test/**/*",
      "build/**/*",
      "styleguide-renderer/**/*"
    ],
    "exclude": ["node_modules"]
  }
  </code></pre>
  
  <p>Folder structure:</p>
  
  <pre><code>root
    -src
      -utils
         -bar.ts
      -foo.ts
  </code></pre>
  
  <p>utils/bar.ts </p>
  
  <pre><code>export const bar = {
     hello: "World"
  }
  </code></pre>
  
  <p>src/foo.ts</p>
  
  <pre><code>import { bar } from "./utils/bar.ts
  
  export default const Foo = {
      bar
  };
  </code></pre>