title: TypeScript gets error: 'duplicate identifier' on class name, after TSC command
body: <p>I've installed typescript globally.</p>
  <p>In the visual studio editor, I have only two files &quot;index.html&quot; and &quot;app.ts&quot;.</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
      &lt;title&gt;Document&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
          &lt;script src=&quot;app.js&quot;&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>For app.ts files:</p>
  <pre><code>class Greeting {
    greetingName: string;
  
    constructor(name: string) {
      this.greetingName = name
    }
  
    seyHello() {
      alert(&quot;Hello &quot; + this.greetingName)
    }
  }
  
  let dd: Greeting= new Greeting(&quot;Leo&quot;)
  dd.seyHello()
  </code></pre>
  <p>When I type the command in the terminal: &quot;tsc app.ts&quot;, the app.js file has been made.
  When I run live server code works fine, and an alert is displayed, but in the &quot;app.tsc&quot; file I got two errors, like:</p>
  <blockquote>
  <p>Duplicate identifier 'Greeting'.ts(2300)</p>
  <p>Cannot redeclare block-scoped variable 'dd'.ts(2451)</p>
  </blockquote>
  <p>What's happened?</p>