Merged
Conversation
tjd985
requested changes
Apr 17, 2025
Contributor
tjd985
left a comment
There was a problem hiding this comment.
잘읽었습니다~~~
오타 두개만 수정해주세요!
이번주도 고생 많으셨습니당ㅎㅎㅎ
Contributor
There was a problem hiding this comment.
type Obj = { [key: string]: number; };
type KeyType = keyof Obj; // string | number;이 예제에서 key는 string | number이며, 이는 자바스크립트 객체 키가 항상 문자열로 강제 지정되므로 객체[0]은 항상 객체["0"]와 동일하기 때문이네요!
덕분에 하나 배워갑니다!! 👍🏻
Member
Author
There was a problem hiding this comment.
오호 저도 몰랐었는데 덕분에 배워요!!!!!
Contributor
There was a problem hiding this comment.
Suggested change
| 이때 타입스크립트는 키가 유효하지 않더라도 타입상으로는 문제가 없기 떄문에 오류를 표시하지 않는다. | |
| 이때 타입스크립트는 키가 유효하지 않더라도 타입상으로는 문제가 없기 때문에 오류를 표시하지 않는다. |
Contributor
There was a problem hiding this comment.
Suggested change
| > 이럴 때는 개발 중에 유효하지 않은 키가 사용되었는 지 또는 undefined일 수 있는 값이 있는 지 등 사전에 타입스크립트 기능을 활용헤 파악하는 것이 중요하다. | |
| > 이럴 때는 개발 중에 유효하지 않은 키가 사용되었는 지 또는 undefined일 수 있는 값이 있는 지 등 사전에 타입스크립트 기능을 활용해 파악하는 것이 중요하다. |
This file contains hidden or 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
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.
close #15
5주차 기다려주셔서 감사합니다 👍
한 주 쉰덕에 더 보기 수월했던 것 같아요!
감기 조심하세요 🥇 🏠 🍄🟫