docs: fixed typos

This commit is contained in:
ruanyf
2023-12-16 14:51:21 +08:00
parent d21f77eebb
commit ef7d619795
3 changed files with 3 additions and 3 deletions

View File

@@ -55,8 +55,8 @@ function doStuff(abc: string, xyz: string) {
// do some stuff
}
// @ts-expect-error
expect(() => {
// @ts-expect-error
doStuff(123, 456);
}).toThrow();
```

View File

@@ -629,7 +629,7 @@ TypeScript 内置的类型描述文件,主要有以下一些,完整的清单
- strictPropertyInitialization
- noImplicitAny
- noImplicitThis
- useUnknownInCatchVaria
- useUnknownInCatchVariables
打开`strict`的时候,允许单独关闭其中一项。

View File

@@ -644,7 +644,7 @@ type ReturnType<
`ThisParameterType<Type>`提取函数类型中`this`参数的类型。
```typescript
function toHex(this: Number) {
function toHex(this:number) {
return this.toString(16);
}