본문 바로가기

주니어에서 시니어로

검색하기
주니어에서 시니어로
프로필사진 _JJ_

  • 분류 전체보기 (31)
    • h1 (1)
    • %^&* (1)
    • STUDY (29)
      • Frontend (10)
      • Javascript (7)
      • Typescript (1)
      • React (6)
      • Next.js (3)
      • React Native (2)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
  • 좋은습관
  • 독서
  • 미라클모닝
  • 블로그
  • 시작
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록STUDY/Typescript (1)

주니어에서 시니어로

[Typescript] type vs interface

진행 중인 리액트 프로젝트를 타입스크립트로 바꾸고 있는데,객체의 타입을 줄 때 어떤건 type으로 주고, 어떤건 interface로 주기에 무슨 차이인가 알아보게 되었다.확장interfaceinterface Person {  name: string;  age: number;}interface Student extends Person {// 확장(상속)  school: string;}const hello: Student = {  name: 'hello',  age: 11,  school: 'world'} typetype Person {  name: string;  age: number;}type Student = Person & { // 확장(상속)  school: string;}const hello: S..

STUDY/Typescript 2024. 11. 18. 10:11
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바