title: Unable to assign the type unknown to an entity with typeorm
body: <p>I'm having issues using TypeOrm with typescript for a specific project. It seems that typescript is not able to recognize a type coming out from a typeorm entity. </p>
  
  <pre><code>@Entity({
  name: "users",
    synchronize: false
  })
  export default class User {
  
    private tempPassword:string | undefined;
  
    @PrimaryGeneratedColumn()
    id!: number;
  
    @Column({
      type: "text"
    })
    name!: string;
  ...
  }
  </code></pre>
  
  <p>The code above is my model. So when I try :</p>
  
  <pre><code>let user: UserModel;
  try {
    user = await getRepository("User").findOne({name: "test"});
  </code></pre>
  
  <p>I have the following error on the user variable :
  <a href="https://i.stack.imgur.com/fE4zp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fE4zp.png" alt="Error"></a></p>
  
  <p>(Which means : unable to assign the type unknown to the type User)</p>
  
  <p><strong>tsconfig.json</strong></p>
  
  <pre><code>{
    "compilerOptions": {
      /* Basic Options */
      // "incremental": true,                   /* Enable incremental compilation */
      "target": "ES2018",                          /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
      "module": "commonjs",                     /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
      "sourceMap": true,                     /* Generates corresponding '.map' file. */
      "outDir": "build",                        /* Redirect output structure to the directory. */
      "rootDir": "./src",                       /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
  
      /* Strict Type-Checking Options */
      "strict": true,                           
      "esModuleInterop": true,                   
  
      /* Experimental Options */
      "experimentalDecorators": true,        /* Enables experimental support for ES7 decorators. */
      "emitDecoratorMetadata": true,         /* Enables experimental support for emitting type metadata for decorators. */
      "resolveJsonModule": true,
    },
    "include": [
      "src/**/*.ts"
    ],
    "exclude": [
      "node_modules"
    ],
  }
  </code></pre>
  
  <p>Is it due to something missing in the tsconfig json ? Big thanks </p>