-
Notifications
You must be signed in to change notification settings - Fork 143
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
Conversation
@@ -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`가 됩니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분을 어떻게 번역해야 할지 모르겠습니다 😅
There was a problem hiding this comment.
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 | ||
// 확정적 할당 단언 |
There was a problem hiding this comment.
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 | |||
## 생성자로부터 클래스 프로퍼티 타입 추론하기 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## 생성자로부터 클래스 프로퍼티 타입 추론하기 | |
## 생성자로부터 클래스 프로퍼티 타입 추론하기 (Class Property Inference from Constructors) |
// v | ||
sideLength!: number; | ||
// ^^^^^^^^ | ||
// type annotation | ||
// 타입 선언 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 타입 선언 | |
// 타입 표기 |
번역 용어 참고
|
||
<!--prettier-ignore --> | ||
```ts | ||
class Square { | ||
// Previously both of these were any | ||
// 이전에 이 둘은 any였습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 이전에 이 둘은 any였습니다. | |
// 이전에 any로 추론했습니다. |
e2d2b61
to
fd76587
Compare
PR전에 아래의 사항들을 확인하셨나요? 확인하셨다면, 체크해주세요!
PR에 대한 간단한 내용 설명을 부탁드립니다!
일부 용어는 https://meetup.toast.com/posts/247 이곳에서 가져다 사용했고,
아직도 이해가 잘 안 되는 부분이 있어서 코멘트 남깁니다!