diff --git a/docs/comment.md b/docs/comment.md index 38ddfa7..126cbe7 100644 --- a/docs/comment.md +++ b/docs/comment.md @@ -55,8 +55,8 @@ function doStuff(abc: string, xyz: string) { // do some stuff } -// @ts-expect-error expect(() => { + // @ts-expect-error doStuff(123, 456); }).toThrow(); ``` diff --git a/docs/tsconfig.json.md b/docs/tsconfig.json.md index b31d427..93f7add 100644 --- a/docs/tsconfig.json.md +++ b/docs/tsconfig.json.md @@ -629,7 +629,7 @@ TypeScript 内置的类型描述文件,主要有以下一些,完整的清单 - strictPropertyInitialization - noImplicitAny - noImplicitThis -- useUnknownInCatchVaria +- useUnknownInCatchVariables 打开`strict`的时候,允许单独关闭其中一项。 diff --git a/docs/utility.md b/docs/utility.md index 0182f97..d177337 100644 --- a/docs/utility.md +++ b/docs/utility.md @@ -644,7 +644,7 @@ type ReturnType< `ThisParameterType`提取函数类型中`this`参数的类型。 ```typescript -function toHex(this: Number) { +function toHex(this:number) { return this.toString(16); }