File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
docs/playground/ko/TypeScript/Type Primitives Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ if (passingResponse[1] === 200) {
34
34
passingResponse [ 2 ] ;
35
35
36
36
// 튜플은 적은 양의 연결된 데이터
37
- // 또는 고정된 데이터를 위한 좋은 패턴처럼 느껴질 수 있습니다.
37
+ // 또는 고정된 데이터 타입을 위한 좋은 패턴처럼 느껴질 수 있습니다.
38
38
39
39
type StaffAccount = [ number , string , string , string ?] ;
40
40
@@ -46,8 +46,8 @@ const staff: StaffAccount[] = [
46
46
47
47
// 튜플의 시작에서 알려진 타입의 집합을
48
48
// 가지고 나서 길이를 알 수 없을 때,
49
- // 길이에 상관없고 추가 인덱스가 특정한 타입이 된다는 것을
50
- // 나타내기 위해 전개 연산자를 사용할 수 있습니다:
49
+ // 전개 연산자를 사용해 길이에 상관없이
50
+ // 나머지를 특정한 타입으로 나타낼 수 있습니다:
51
51
52
52
type PayStubs = [ StaffAccount , ...number [ ] ] ;
53
53
@@ -61,8 +61,8 @@ const monthOnePayments = payStubs[0][1] + payStubs[1][1] + payStubs[2][1];
61
61
const monthTwoPayments = payStubs [ 1 ] [ 2 ] + payStubs [ 2 ] [ 2 ] ;
62
62
const monthThreePayments = payStubs [ 2 ] [ 2 ] ;
63
63
64
- // 타입을 가진 매개변수 중 정의되지 않은 숫자를 사용하는
65
- // 함수를 설명하기 위해 튜플을 사용할 수 있습니다:
64
+ // 튜플을 사용하면 개수를 알 수 없는
65
+ // 매개변수 타입을 선언할 수 있습니다:
66
66
67
67
declare function calculatePayForEmployee ( id : number , ...args : [ ...number [ ] ] ) : number ;
68
68
You can’t perform that action at this time.
0 commit comments