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) {
3434passingResponse [ 2 ] ;
3535
3636// 튜플은 적은 양의 연결된 데이터
37- // 또는 고정된 데이터를 위한 좋은 패턴처럼 느껴질 수 있습니다.
37+ // 또는 고정된 데이터 타입을 위한 좋은 패턴처럼 느껴질 수 있습니다.
3838
3939type StaffAccount = [ number , string , string , string ?] ;
4040
@@ -46,8 +46,8 @@ const staff: StaffAccount[] = [
4646
4747// 튜플의 시작에서 알려진 타입의 집합을
4848// 가지고 나서 길이를 알 수 없을 때,
49- // 길이에 상관없고 추가 인덱스가 특정한 타입이 된다는 것을
50- // 나타내기 위해 전개 연산자를 사용할 수 있습니다:
49+ // 전개 연산자를 사용해 길이에 상관없이
50+ // 나머지를 특정한 타입으로 나타낼 수 있습니다:
5151
5252type PayStubs = [ StaffAccount , ...number [ ] ] ;
5353
@@ -61,8 +61,8 @@ const monthOnePayments = payStubs[0][1] + payStubs[1][1] + payStubs[2][1];
6161const monthTwoPayments = payStubs [ 1 ] [ 2 ] + payStubs [ 2 ] [ 2 ] ;
6262const monthThreePayments = payStubs [ 2 ] [ 2 ] ;
6363
64- // 타입을 가진 매개변수 중 정의되지 않은 숫자를 사용하는
65- // 함수를 설명하기 위해 튜플을 사용할 수 있습니다:
64+ // 튜플을 사용하면 개수를 알 수 없는
65+ // 매개변수 타입을 선언할 수 있습니다:
6666
6767declare function calculatePayForEmployee ( id : number , ...args : [ ...number [ ] ] ) : number ;
6868
You can’t perform that action at this time.
0 commit comments