How can I generate a tsconfig.json file?

后端 未结 9 446
失恋的感觉
失恋的感觉 2020-12-04 10:48

How can I generate a tsconfig.json via the command line? I tried command tsc init, but this doesn\'t work.

9条回答
  •  我在风中等你
    2020-12-04 10:58

    install TypeScript :

    npm install typescript
    

    add tsc script to package.json:

    "scripts": {
      "tsc": "tsc"
     },
    

    run this:

    npx tsc --init
    

提交回复
热议问题