-
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
[2주차] 기본/도전 과제 제출 #2
Conversation
const router: Router = express.Router(); | ||
|
||
router.get("/", (req: Request, res: Response) => { | ||
const blog: Object = { |
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.
작성해주신 것처럼 Object는 모든 객체가 할당이 될 수 있습니다:) 어떻게 보면 any와 같을 수도 있겠네요! 그렇지만 Object를 타입으로 정의하는 경우 타입 검사에 엄격한 TypeScript를 사용하는 의도가 모호해질 수도 있다는 생각이 들었어요😢
객체의 타입을 명확하게 정의하기 위해서 1차세미나에서 배웠던 interface를 활용해보는 건 어떨까용?
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.
interface로 쓸 생각을 못했네요! 추후에 수정하겠습니다!
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.
과제하시느라 고생 많이 하셨습니다 !! 질문 해주신 내용 덕분에 리뷰남겨조 성장중..!💪
화이팅해보자구요🔥
}); | ||
}); | ||
|
||
module.exports = router; |
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.
파일 마지막에 빨간색 금지 표지판같이 생긴거 보이시나욥?
파일의 끝엔 EOF 라고 개행문자를 추가하는게 좋습니다!
참고하면 좋을거 같아요 !
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.
민재님 노션글 처럼 router를 따로 분리하는 것도 좋은 연습이 될거 같습니당!!
수현님 덕분에 module export랑 파일 명명법 등등 많은 공부를 했었습니다.
이번 과제도 하느랴 고생 많으셨습니다 👏👏
title: "글 제목", | ||
writer: "곰돌이", | ||
content: "글 내용~", | ||
isLike: true, |
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.
blog 타입 선언을 Object라고 해도 되긴 하지만 나중에 더 자세히 선언하실거면 interface를 만들어서 타입 지정을 해도 좋을거 같습니당
곰돌이~ 귀여워용 ㅎㅎㅎ
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.
오 좋습니다!
SERVER PR
🐕 과제 구현 명세
🐥 이런 점이 새로웠어요 / 어려웠어요