Skip to content

Literal types issue115 #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Aug 15, 2020
Merged

Literal types issue115 #139

merged 12 commits into from
Aug 15, 2020

Conversation

seohyun0120
Copy link
Contributor

ref #115

내용이 많지않아 한 번에 번역 진행했습니다 😄

몇 가지 질문이 있습니다.

  1. 8번째 줄, collective type은 어떻게 번역해야할까요?
  2. 13번째 줄, LIiteral Narrowing리터럴 축소로 번역했는데 매끄럽지 않은 것 같아요.
  3. 33번째 줄, union type, type guards, type aliases들은 어떻게 번역해야할까요?

리뷰 부탁드립니다. 🙇‍♀️

* 영어 1차 번역

* 원문 삭제, 더 매끄러운 번역체로 수정

* 매끄러운  번역체로 추가 수정

* 1차 수정

* 2차 수정

* 3차 수정
@dvlprsh dvlprsh requested review from bumkeyy, dvlprsh and guyeol August 13, 2020 14:41
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
@dvlprsh
Copy link
Member

dvlprsh commented Aug 13, 2020

@seohyun0120

3. 33번째 줄, union type, type guards, type aliases들은 어떻게 번역해야할까요?

wiki 번역용어집alias -> 별칭으로 정리되어 있습니다~

union type -> 유니언 타입 참고
type guards -> 타입 가드 참고
type aliases -> 타입 별칭
으로 번역하시면 될거 같습니다 😄

@seohyun0120
Copy link
Contributor Author

local 환경에서 gitbook 테스트를 하다가 이상한 점(?)을 발견했어요.
npm test에는 따로 오류 메세지가 뜨지 않았는데... gitbook에서 보면 아래와 같이 보입니다.
Screen Shot 2020-08-14 at 12 42 52 AM

마크다운 코드블럭에 ts twoslash가 아닌 ts를 사용하게 되면 아래와 같이 잘 인식을 하는 것 같아서 수정했습니다 :)
Screen Shot 2020-08-14 at 12 47 25 AM

// We're making a guarantee that this variable
// helloWorld will never change, by using const.
```ts
// const를 사용하여 변수 helloworld가
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// const를 사용하여 변수 helloworld가
// const를 사용하여 변수 helloWorld가

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정했습니다~ :)

let hiWorld = "Hi World";
```

The process of going from an infinite number of potential cases (there are an infinite number of possible string values) to a smaller, finite number of potential case (in `helloWorld`'s case: 1) is called narrowing.
무한한 수의 잠재적 케이스들 (문자열의 경우의 수는 무한대)을 유한한 수의 잠재적 케이스 (`helloWorld`의 경우의 수는 1개)로 줄여나가는 것을 축소 (narrowing)라 한다.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
무한한 수의 잠재적 케이스들 (문자열의 경우의 수는 무한대)을 유한한 수의 잠재적 케이스 (`helloWorld`경우의 수는 1개)로 줄여나가는 것을 축소 (narrowing)라 한다.
무한한 수의 잠재적 케이스들 (문자열 값은 경우의 수가 무한대)을 유한한 수의 잠재적 케이스 (`helloWorld`경우: 1개)로 줄여나가는 것을 축소 (narrowing)라 한다.

[제안]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제안해주신 문장이 더 매끄럽네요. 반영했습니다 :)

@@ -44,8 +44,8 @@ class UIElement {
} else if (easing === "ease-out") {
} else if (easing === "ease-in-out") {
} else {
// It's possible that someone could reach this
// by ignoring your types though.
// 하지만 누군가는 타입을 무시하게된다면
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 하지만 누군가는 타입을 무시하게된다면
// 하지만 누군가가 타입을 무시하게 된다면

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정했습니다~

```

String literal types can be used in the same way to distinguish overloads:
문자열 리터럴 타입은 중복 정의를 구별하는 것과 동일한 방법으로 사용될 수 있습니다:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overload중복 정의로 번역하셨는데
overload라는 단어가 프로그래밍에서 익숙한 단어이기 때문에 그대로 오버로드로 쓰는 것은 어떤가요?
의미 전달에는 무리 없을 것 같다는 생각입니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사실 이 부분 고민을 했었는데 역시 오버로드가 더 잘 와닿는 것 같네요.
오버로드로 수정했습니다 :)

@guyeol
Copy link
Member

guyeol commented Aug 14, 2020

local 환경에서 gitbook 테스트를 하다가 이상한 점(?)을 발견했어요.
npm test에는 따로 오류 메세지가 뜨지 않았는데... gitbook에서 보면 아래와 같이 보입니다.
Screen Shot 2020-08-14 at 12 42 52 AM

마크다운 코드블럭에 ts twoslash가 아닌 ts를 사용하게 되면 아래와 같이 잘 인식을 하는 것 같아서 수정했습니다 :)
Screen Shot 2020-08-14 at 12 47 25 AM

현재 twoslash 파싱을 지원하지 않기 때문에 발생하는 이슈인데요 최신 타입스크립트 페이지에서 twoslash 패키지를 사용하고 있기 때문에 지속적으로 이 문제가 발생하고 있습니다 일단은 markdown에서 twoslash를 삭제해서 빌드해야할 것 같아요 ㅠ

@@ -5,35 +5,35 @@ permalink: /docs/handbook/literal-types.html
oneline: Using literal types with TypeScript
---

A literal is a more concrete sub-type of a collective type.
What this means is that `"Hello World"` is a `string`, but a `string` is not `"Hello World"` inside the type system.
리터럴 타입은 collective 타입의 구체적인 하위 타입입니다.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
리터럴 타입은 collective 타입의 구체적인 하위 타입입니다.
리터럴 타입은 collective 타입의 보다 구체적인 하위 타입입니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정했습니다 : )

@guyeol
Copy link
Member

guyeol commented Aug 14, 2020

ref #115

내용이 많지않아 한 번에 번역 진행했습니다 😄

몇 가지 질문이 있습니다.

  1. 8번째 줄, collective type은 어떻게 번역해야할까요?
  2. 13번째 줄, LIiteral Narrowing리터럴 축소로 번역했는데 매끄럽지 않은 것 같아요.
  3. 33번째 줄, union type, type guards, type aliases들은 어떻게 번역해야할까요?

리뷰 부탁드립니다. 🙇‍♀️

  1. 집합 타입? 집합체 타입?
  2. 애매하긴하네요리터럴 축소라고 해도 충분히 이해는 갈 것 같아요. 리터럴 타입 좁히기는 어떤가요?

@seohyun0120
Copy link
Contributor Author

현재 twoslash 파싱을 지원하지 않기 때문에 발생하는 이슈인데요 최신 타입스크립트 페이지에서 twoslash 패키지를 사용하고 있기 때문에 지속적으로 이 문제가 발생하고 있습니다 일단은 markdown에서 twoslash를 삭제해서 빌드해야할 것 같아요 ㅠ

확인했습니다.
다음에 작업할 때도 twoslash를 삭제해야겠군요...

@seohyun0120
Copy link
Contributor Author

ref #115
내용이 많지않아 한 번에 번역 진행했습니다 😄
몇 가지 질문이 있습니다.

  1. 8번째 줄, collective type은 어떻게 번역해야할까요?
  2. 13번째 줄, LIiteral Narrowing리터럴 축소로 번역했는데 매끄럽지 않은 것 같아요.
  3. 33번째 줄, union type, type guards, type aliases들은 어떻게 번역해야할까요?

리뷰 부탁드립니다. 🙇‍♀️

  1. 집합 타입? 집합체 타입?
  2. 애매하긴하네요리터럴 축소라고 해도 충분히 이해는 갈 것 같아요. 리터럴 타입 좁히기는 어떤가요?
  1. 집합 타입
  2. 리터럴 타입 좁히기 로 수정했습니다!

Copy link
Member

@guyeol guyeol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~!!

Copy link
Member

@dvlprsh dvlprsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다 👍 👍

@dvlprsh dvlprsh merged commit 89765e3 into typescript-kr:master Aug 15, 2020
@bumkeyy
Copy link
Member

bumkeyy commented Aug 15, 2020

closed #115

bumkeyy pushed a commit that referenced this pull request Aug 18, 2020
* translate TS for JS Programmers(Defining Types)

* Literal types issue115 (#139)

* 1차 번역

* 원문 삭제, 더 매끄럽게 번역

* 맞춤법 수정

* Babel with typescript issue118 (#138)

* 영어 1차 번역

* 원문 삭제, 더 매끄러운 번역체로 수정

* 매끄러운  번역체로 추가 수정

* 1차 수정

* 2차 수정

* 3차 수정

* docs: add seohyun0120 as a contributor (#140)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* 1차 번역

* 원문 삭제, 더 매끄럽게 번역

* 맞춤법 수정

* ts twoslash가 제대로 작동하지 않는 문제 수정 (twoslash 삭제)

* 2차 수정

* contributors 정보 수정

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* specify node version to 12.18.2

* npm audit

* translate TS for JS Programmers(Defining Types)

* 리뷰에 따라 내용 수정

* fix push conflict

Co-authored-by: Seohyun Yoon <[email protected]>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: YeonJuan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants