Merge pull request #46 from Sayoko123f/main

fix: typo in comment.md
This commit is contained in:
Ruan YiFeng
2023-08-16 08:50:07 +08:00
committed by GitHub

View File

@@ -42,7 +42,7 @@ x = 0;
x = false; // 不报错
```
上面示例中,最后一行是类型错误,变量`x`的类型是`number`,不能等于布尔值。但是因为前面加上了`// @ts-expect-error`,编译器会跳过这一行的类型检查,所以不会报错。
上面示例中,最后一行是类型错误,变量`x`的类型是`number`,不能等于布尔值。但是因为前面加上了`// @ts-ignore`,编译器会跳过这一行的类型检查,所以不会报错。
## `// @ts-expect-error`