Skip to content

class property type: first commit #181

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 1 commit into from
Sep 9, 2020

Conversation

zigsong
Copy link
Contributor

@zigsong zigsong commented Sep 6, 2020

PR전에 아래의 사항들을 확인하셨나요? 확인하셨다면, 체크해주세요!

  • CONTRIBUTING.md 파일을 정독했습니다.
  • lint 검사를 진행했습니다.
  • fetch를 통해 최신 upstream 내용을 반영했습니다.
👆 꼭 확인해주시길 바랍니다! 👆
  • PR의 종류가 무엇인지 체크해주세요!
    • Bug
    • Docs
    • Typo
    • etc.

PR에 대한 간단한 내용 설명을 부탁드립니다!

  • Class Property Inference from Constructors 부분 번역했습니다.
    일부 용어는 https://meetup.toast.com/posts/247 이곳에서 가져다 사용했고,
    아직도 이해가 잘 안 되는 부분이 있어서 코멘트 남깁니다!

@@ -291,7 +291,7 @@ class Square {
}
```

In cases where not all paths of a constructor assign to an instance member, the property is considered to potentially be `undefined`.
생성자의 모든 경로가 인스턴스 멤버에 할당한 것이 아닐 경우, 프로퍼티는 잠재적으로 `undefined`가 됩니다.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

이 부분을 어떻게 번역해야 할지 모르겠습니다 😅

Copy link
Member

Choose a reason for hiding this comment

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

번역 적절한 것 같아요 👍


```ts
class Square {
// definite assignment assertion
// 확정적 할당 단언
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -272,14 +272,14 @@ In fact, TypeScript's editor support will try to display them as overloads when

To learn more, check out [the pull request](https://github.com/microsoft/TypeScript/pull/38234) for labeled tuple elements.

## Class Property Inference from Constructors
## 생성자로부터 클래스 프로퍼티 타입 추론하기
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
## 생성자로부터 클래스 프로퍼티 타입 추론하기
## 생성자로부터 클래스 프로퍼티 타입 추론하기 (Class Property Inference from Constructors)

// v
sideLength!: number;
// ^^^^^^^^
// type annotation
// 타입 선언
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
// 타입 선언
// 타입 표기

번역 용어 참고


<!--prettier-ignore -->
```ts
class Square {
// Previously both of these were any
// 이전에 이 둘은 any였습니다.
Copy link
Member

@bumkeyy bumkeyy Sep 7, 2020

Choose a reason for hiding this comment

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

Suggested change
// 이전에 이 둘은 any였습니다.
// 이전에 any로 추론했습니다.

@zigsong zigsong force-pushed the issue171-class-property branch from e2d2b61 to fd76587 Compare September 7, 2020 15:07
@dvlprsh dvlprsh merged commit 70c7728 into typescript-kr:master Sep 9, 2020
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