From c3d763022815424337d68a8199f08144825e6bf7 Mon Sep 17 00:00:00 2001 From: WuMingDao <146366930+WuMingDao@users.noreply.github.com> Date: Sun, 23 Nov 2025 04:46:40 +0800 Subject: [PATCH] docs(testing-types.md): Add translate --- guide/testing-types.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) ```