docs: finish chapter 2

This commit is contained in:
ruanyf
2023-07-14 17:22:10 +08:00
parent 111aa6ef94
commit 5d6f60102c
2 changed files with 3 additions and 3 deletions

View File

@@ -1 +1,2 @@
- intro.md: 简介
- basic.md: 基本用法

View File

@@ -187,8 +187,6 @@ $ tsc app.ts --outDir dist
上面命令会在`dist`子目录下生成`app.js`
注意,`--outDir``--outFile`不能同时使用。
**3--target**
为了保证编译结果能在各种 JavaScript 引擎运行tsc 默认会将 TypeScript 代码编译成很低版本的 JavaScript即3.0版本(以`es3`表示)。这通常不是我们想要的结果。
@@ -332,4 +330,5 @@ $ ts-node
要退出这个 REPL 环境,可以按下 Ctrl + d或者输入`.exit`
如果只是想简单运行 TypeScript 代码看看结果ts-node 不失为一个简单的方法。
如果只是想简单运行 TypeScript 代码看看结果ts-node 不失为一个便捷的方法。