Skip to content
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/97: Generics with interface #59

Open
wants to merge 43 commits into
base: UdemyTs
Choose a base branch
from

Conversation

4BFC
Copy link
Member

@4BFC 4BFC commented Oct 1, 2024

✍Udemy/ts/section7/97: Generics with interface

본 PR은 청강 1회독을 마친 후 N회독으로 작성된 PR입니다.

🔗Reference

🔥KeyWord

  • Generics
  • interface

📝Description

  • Generics과 interface를 함께 사용하기
  • 🚩: interface와 Generics의 조합해서 사용하는 방법과 실습
    • Generics는 개발자에게 타입을 정의함에 있어서 매우 유연하게 선언할 수 있게 해준다. 위 코드를 보면 우리가 정확하게 명세해야할 타입들은 interface로 정의하고 그 외의 유연하게 타입을 정해야하는 부분은 Generics로 함수를 구현하면 별 문제 없이 코드를 동작하게 할 수 있다. 물론, 해당 함수의 반환 값의 설정은 선택적이다. 만약 재사용함에 있어서 엄격하게 설정을 해야한다면 반환 타입을 명시하면 된다. 단, 명시함으로 return 값이 명시된 타입에서 벗어나면 error를 발생시킨다는 것을 알아두어야 한다.

📌Summary

4BFC and others added 30 commits August 27, 2024 01:50
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 작성한 커밋입니다.
Github에서 작성한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
@4BFC 4BFC added the 2회독 회독 label Oct 1, 2024
@4BFC 4BFC added this to the Udemy:TypeScript milestone Oct 1, 2024
@4BFC 4BFC requested a review from nyun-nye October 1, 2024 16:09
@4BFC 4BFC self-assigned this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2회독 회독
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant