Skip to content

Commit 0906747

Browse files
committed
translate for ko
1 parent 8ad1f19 commit 0906747

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
22
title: Keyof Type Operator
33
layout: docs
4-
permalink: /docs/handbook/2/keyof-types.html
5-
oneline: "Using the keyof operator in type contexts."
4+
permalink: /ko/docs/handbook/2/keyof-types.html
5+
oneline: "타입 컨텍스트에서 keyof 연산자 사용하기"
66
---
77

8-
## The `keyof` type operator
8+
## `keyof` 타입 연산자
99

10-
The `keyof` operator takes an object type and produces a string or numeric literal union of its keys.
11-
The following type P is the same type as "x" | "y":
10+
`keyof` 연산자는 객체 타입에서 객체의 키 값들을 숫자나 문자열 리터럴 유니언을 생성합니다.
11+
아래 타입 P는 "x" | "y"와 동일한 타입입니다.
1212

1313
```ts twoslash
1414
type Point = { x: number; y: number };
1515
type P = keyof Point;
1616
// ^?
1717
```
1818

19-
If the type has a `string` or `number` index signature, `keyof` will return those types instead:
19+
만약 타입이 `string`이나 `number` 인덱스 시그니쳐를 가지고 있다면, `keyof`는 해당 타입을 리턴합니다.
2020

2121
```ts twoslash
2222
type Arrayish = { [n: number]: unknown };
@@ -28,6 +28,6 @@ type M = keyof Mapish;
2828
// ^?
2929
```
3030

31-
Note that in this example, `M` is `string | number` -- this is because JavaScript object keys are always coerced to a string, so `obj[0]` is always the same as `obj["0"]`.
31+
위 예제에서 주목할 점은 `M``string | number`라는 점입니다. -- JavaScript 객체 키는 항상 문자열을 강제하기 때문에, `obj[0]``obj["0"]`과 동일합니다.
3232

33-
`keyof` types become especially useful when combined with mapped types, which we'll learn more about later.
33+
`keyof` 타입은 우리가 추후에 학습할 매핑된 타입과 함께 사용할 때 특히 유용합니다.

0 commit comments

Comments
 (0)