Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update typescript.md #312

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,23 @@ npm install -D typescript ts-node
}
```

3. 配置 TypeScript 在编译过程中的一些选项

在 hello-node 的根目录下创建一个名为 tsconfig.json 的文件,这是 TypeScript 的配置文件,写入以下内容:

```json
{
"compilerOptions": {
"target": "es6",
"module": "es6",
"outDir": "./dist",
"skipLibCheck": true
}
}
```

这份配置是将 ts 编译成的 js 文件,可以在 [tsconfig.json](#了解-tsconfig-json) 了解更多。

准备工作完毕!

:::tip
Expand Down