How can I generate tsconfig.json
via command line? I tried command tsc init
, but this doesn't work.
如何通过命令行生成tsconfig.json?我尝试了命令tsc init,但这不起作用。
1 个解决方案
#1
98
It is supported since the release of TypeScript 1.6.
自TypeScript 1.6发布以来,它受到支持。
Try to run in your console the following to check the version:
尝试在控制台中运行以下内容以检查版本:
$ tsc -v
If the version is older than 1.6 you will need to update:
如果版本低于1.6,则需要更新:
$ npm install -g typescript
Remember that you need to install node.js to use npm.
请记住,您需要安装node.js才能使用npm。
The correct command is --init
not init
:
正确的命令是--init not init:
$ tsc --init
#1
98
It is supported since the release of TypeScript 1.6.
自TypeScript 1.6发布以来,它受到支持。
Try to run in your console the following to check the version:
尝试在控制台中运行以下内容以检查版本:
$ tsc -v
If the version is older than 1.6 you will need to update:
如果版本低于1.6,则需要更新:
$ npm install -g typescript
Remember that you need to install node.js to use npm.
请记住,您需要安装node.js才能使用npm。
The correct command is --init
not init
:
正确的命令是--init not init:
$ tsc --init