How can I generate a tsconfig.json file?

后端 未结 9 431
失恋的感觉
失恋的感觉 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 11:06

    You need to have typescript library installed and then you can use

    npx tsc --init 
    

    If the response is error TS5023: Unknown compiler option 'init'. that means the library is not installed

    yarn add --dev typescript
    

    and run npx command again

提交回复
热议问题