-
Notifications
You must be signed in to change notification settings - Fork 0
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
Udemy/Ts/section7/101: Partial, Readonly type #63
Open
4BFC
wants to merge
49
commits into
UdemyTs
Choose a base branch
from
Udemy/Ts/section7/101
base: UdemyTs
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 작성한 커밋입니다.
Github에서 작성한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✍Udemy/Ts/section7/101: Partial, Readonly type
🔗Reference
🔥KeyWord
?
📝Description
?
와 같은 옵셔널과 같은 효과를 가져온다. 따라서 inteface에 필요한 요소들을 Optional로 변경하거나 사용한다면 inteface를 기준으로 다른 코드 모든 부분이 선택적인 방향으로 변경이 된다. 즉, 다른 코드에 영향을 준다는 뜻이다. 따라서 Parial를 사용하면 내가 사용하고 싶은 영역의 함수나 코드에서만 Optional 효과를 줄 수 있다는 것이다. 단, 선언과 동시에 모든 속성을 설정할 필요는 없지만 빈 객체{}
를 할다안다면Type Error
가 발생할 것이다. Partial은 모든 속성을 필수적으로 강행하기 때문이다.Readonly<Type>
은 일부 객체, interface 속성들만 줄 수 있다.📌Summary