Skip to content

Commit 36f618f

Browse files
committed
docs: add FAQ section on TypeScript type hints in README files
1 parent daa3861 commit 36f618f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ What other exciting features are there? Please continue to explore! Or you can c
5858
</a>
5959
</p>
6060

61+
[Why my project has no TypeScript type hints after installation?](#why-my-project-has-no-typescript-type-hints-after-installation)
62+
6163
<details>
6264
<summary>Here are some hot questions, feel free to check them out</summary>
6365

@@ -1464,9 +1466,9 @@ const weekInit = { Sunday: 0, Monday: 1 };
14641466
const WeekEnum = Enum(weekInit);
14651467
```
14661468

1467-
### Why did all enum types become `any` after upgrading to version 3.0?
1469+
### Why my project has no TypeScript type hints after installation?
14681470

1469-
This is due to incorrect configuration in `tsconfig.json`. Please read the [Migration Guide](./docs/migration-guide-v2-to-v3.md#upgrade-typescript) carefully.
1471+
This is due to incorrect configuration in `tsconfig.json`. Please refer to [this document](./docs/migration-guide-v2-to-v3.md#modify-tsconfigjson) for more details.
14701472

14711473
### I want to define a generic enum type that can represent any enum. The current enum type definition is too complex. Is there a simple way?
14721474

README.zh-CN.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
</a>
5959
</p>
6060

61+
[为什么我的项目安装后没有 TypeScript 类型提示?](#为什么我的项目安装后没有-typescript-类型提示)
62+
6163
<details>
6264
<summary>这里有几个常见问题,有兴趣也可以阅读一下</summary>
6365

@@ -1449,9 +1451,9 @@ const weekInit = { Sunday: 0, Monday: 1 };
14491451
const WeekEnum = Enum(weekInit);
14501452
```
14511453

1452-
### 为什么升级到 3.0 之后,所有枚举的类型都变成了 any
1454+
### 为什么我的项目安装后没有 TypeScript 类型提示
14531455

1454-
这是因为 `tsconfig.json` 的配置不正确,请仔细阅读 [迁移指南](./docs/migration-guide-v2-to-v3.zh-CN.md#升级-typescript)
1456+
这是因为 tsconfig.json 中的配置不正确,请参考[这篇文档](./docs/migration-guide-v2-to-v3.zh-CN.md#修改-tsconfigjson),了解更多详情
14551457

14561458
### 我想定义一个通用的枚举类型,可以表示任意枚举,目前的枚举类型定义太复杂了,有没有简单的办法?
14571459

0 commit comments

Comments
 (0)