How do you manage Typescript in Webstorm?



  • I can't figure it out.
    Created. tsconfig.json:

    {
      "compilerOptions": {
        "module": "system",
        "noImplicitAny": true,
        "removeComments": true,
        "preserveConstEnums": true,
        "outFile": "./index.js",
        "sourceMap": true
      },
      "exclude": [
        "node_modules",
        "wwwroot"
      ]
    }
    

    And a simple code on ts:

    var list: number[] = [10, 20, 30];
    var colors: string[] = ["red", "green", "blue"];
    console.log(list[0]);
    console.log(colors[1]);
    

    And I have no idea what else to do. Tell me how the miracle begins when I press. Run♪ He's giving me a name ♪ Edit Configuration♪ Which I don't know what to do.



  • insert typescript compilator (Settings , Languages " Frameworks , Typescript, Enable TypeScript compiler and Use tsconfig.jsonAfter your code is co-compiled in the context of the menu ofiled file (index.js) Choose Debug. Well, the stop points, of course, have to be put in the ts file.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2