title: Unexpected token; 'module, class, interface, enum, import or statement' expected. in typescript
body: <p>I am trying to learn typescript and angular.I write code </p>
  
  <pre><code>**main.ts**
  import { LikeComponent } from "./like.component";
  
  let component = new LikeComponent(10,true);
  component.onClick();
  console.log(`likescount: ${component.likesCount}, isSelect: ${component.isSelected}`);
  
  **like.component.ts**
  export class LikeComponent
  {
      constructor(public likesCount: number,public isSelected: boolean) {
  
      }
      onClick() {
          this.likesCount += (this.isSelected) ? 1: -1;
          this.isSelected = !this.isSelected;
      }
  }
  </code></pre>
  
  <p>but it throws error like
  <a href="https://i.stack.imgur.com/BDcUZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BDcUZ.png" alt="enter image description here"></a></p>
  
  <p>I have folder structure like,</p>
  
  <p><a href="https://i.stack.imgur.com/uYCJJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uYCJJ.png" alt="enter image description here"></a></p>
  
  <p>I have tried adding below code in tsconfig.js but not luck</p>
  
  <pre><code>    {
    "compileOnSave": false,
    "compilerOptions": {
      "baseUrl": "./",
      "outDir": "./dist/out-tsc",
      "sourceMap": true,
      "declaration": false,
      "module": "es2015",
      "moduleResolution": "node",
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "target": "es5",
      "typeRoots": [
        "node_modules/@types"
      ],
      "lib": [
        "es2017",
        "dom"
      ]
    }
  }
  </code></pre>
  
  <p>I tried to run only 'tsc like.component.cs' but got an error like 'cannot run external module unless--module is provided'.</p>
  
  <p>tsc --version : 1.0.3.0</p>