diff --git a/guide/testing-types.md b/guide/testing-types.md index 26fc4bc3..8bbc27a7 100644 --- a/guide/testing-types.md +++ b/guide/testing-types.md @@ -32,7 +32,7 @@ test('my types work properly', () => { expectTypeOf(mount).toBeFunction() expectTypeOf(mount).parameter(0).toExtend<{ name: string }>() - // @ts-expect-error name is a string + // @ts-expect-error 名称为字符串 assertType(mount({ name: 42 })) }) ``` @@ -106,7 +106,7 @@ expectTypeOf(one).toEqualTypeOf() const answer = 42 assertType(answer) -// @ts-expect-error answer is not a string +// @ts-expect-error 答案不是字符串 assertType(answer) ``` @@ -116,7 +116,7 @@ assertType(answer) 这将通过,因为它预计会出现错误,但 “answer” 这个词有错别字,所以这是一个误报错误: ```ts -// @ts-expect-error answer is not a string +// @ts-expect-error 答案不是字符串 assertType(answr) ```