Skip to content

Commit 7912419

Browse files
committed
기존 문서와 동일하게 수정
1 parent 20b7e8b commit 7912419

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Diff for: pages/release-notes/typescript-4.0.md

-4
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,8 @@ function partialCall<T extends Arr, U extends Arr, R>(
170170
const foo = (x: string, y: number, z: boolean) => {};
171171

172172
const f1 = partialCall(foo, 100);
173-
// [Error] Argument of type 'number' is not assignable to parameter of type 'string'.
174173

175174
const f2 = partialCall(foo, "hello", 100, true, "oops");
176-
// [Error] Expected 4 arguments, but got 5.
177175

178176
// 작동합니다!
179177
const f3 = partialCall(foo, "hello");
@@ -183,11 +181,9 @@ const f3 = partialCall(foo, "hello");
183181

184182
// 작동합니다!
185183
f3(123, true);
186-
// [Error] Expected 2 arguments, but got 0.
187184
f3();
188185

189186
f3(123, "hello");
190-
// [Error] Argument of type 'string' is not assignable to parameter of type 'boolean'.
191187
```
192188

193189
가변 인자 튜플 타입은 특히 기능 구성과 관련하여 많은 새로운 흥미로운 패턴을 가능하게 합니다.

0 commit comments

Comments
 (0)