Skip to content

Commit 849c26c

Browse files
authored
Merge pull request #809 from WuMingDao/patch-12
docs(testing-types.md): Add translate
2 parents 971e0ea + c3d7630 commit 849c26c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

guide/testing-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test('my types work properly', () => {
3232
expectTypeOf(mount).toBeFunction()
3333
expectTypeOf(mount).parameter(0).toExtend<{ name: string }>()
3434

35-
// @ts-expect-error name is a string
35+
// @ts-expect-error 名称为字符串
3636
assertType(mount({ name: 42 }))
3737
})
3838
```
@@ -106,7 +106,7 @@ expectTypeOf(one).toEqualTypeOf<typeof two>()
106106
const answer = 42
107107

108108
assertType<number>(answer)
109-
// @ts-expect-error answer is not a string
109+
// @ts-expect-error 答案不是字符串
110110
assertType<string>(answer)
111111
```
112112

@@ -116,7 +116,7 @@ assertType<string>(answer)
116116
这将通过,因为它预计会出现错误,但 “answer” 这个词有错别字,所以这是一个误报错误:
117117

118118
```ts
119-
// @ts-expect-error answer is not a string
119+
// @ts-expect-error 答案不是字符串
120120
assertType<string>(answr)
121121
```
122122

0 commit comments

Comments
 (0)