Skip to content

Commit e22e379

Browse files
committed
fix skip
1 parent 7b8fa9f commit e22e379

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README-zh_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4017,7 +4017,6 @@ NoInfer 是一种实用类型,旨在阻止泛型函数范围内类型的自动
40174017

40184018
示例:
40194019

4020-
<!-- skip -->
40214020
```typescript
40224021
// 泛型函数范围内类型的自动推断。
40234022
function fn<T extends string>(x: T[], y: T) {
@@ -4028,6 +4027,7 @@ const r = fn(['a', 'b'], 'c'); // 此处的类型为 ("a" | "b" | "c")[]
40284027

40294028
使用 NoInfer
40304029

4030+
<!-- skip -->
40314031
```typescript
40324032
// 使用 NoInfer 阻止类型推断的示例函数
40334033
function fn2<T extends string>(x: T[], y: NoInfer<T>) {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4050,7 +4050,6 @@ NoInfer is a utility type designed to block the automatic inference of types wit
40504050

40514051
Example:
40524052

4053-
<!-- skip -->
40544053
```typescript
40554054
// Automatic inference of types within the scope of a generic function.
40564055
function fn<T extends string>(x: T[], y: T) {
@@ -4061,6 +4060,7 @@ const r = fn(['a', 'b'], 'c'); // Type here is ("a" | "b" | "c")[]
40614060

40624061
With NoInfer:
40634062

4063+
<!-- skip -->
40644064
```typescript
40654065
// Example function that uses NoInfer to prevent type inference
40664066
function fn2<T extends string>(x: T[], y: NoInfer<T>) {

0 commit comments

Comments
 (0)