본문 바로가기 메뉴 바로가기

Yuniverse

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Yuniverse

검색하기 폼
  • 분류 전체보기 (164)
    • 꼬리에 꼬리를 무는 공부 (4)
      • Front-end (4)
      • Back-end (0)
      • CS (0)
    • 우리FISA (26)
    • JS-algorithm (62)
      • 프로그래머스 (38)
      • BOJ (14)
      • JS 100제 (10)
    • HTML & CSS (5)
      • Tailwind CSS (0)
    • JS (12)
      • Javascript (8)
      • Node.js (4)
    • React (8)
    • TypeScript (7)
    • Java (4)
    • 유데미 프로젝트 캠프 (20)
      • 학습일지 (13)
      • 과제 (7)
    • Bundler (9)
      • Parcel (4)
      • Webpack (5)
    • Cloud (3)
      • Firebase (3)
    • 배포 (1)
    • Git (3)
  • 방명록

type alias vs interface (1)
📒 Interfaces

📜 Interfaces Interfaces란 어떤 타입을 만드는 방식인데 내부적인 것과 상관없이 외부적으로 드러나는 객체의 사용방식이 적힌 타입이다. function hello(person: { name: string; age: number; }): void { console.log(`안녕하세요! ${person.name} 입니다.`); } const p: { name: string; age: number; } = { name: 'Mark', age: 35 }; hello(p); // 안녕하세요! Mark 입니다. //Interfaces 사용하면 interface Person { name: string; age: number; } function hello(person: Person): v..

TypeScript 2022. 12. 16. 11:21
이전 1 다음
이전 다음

Blog is powered by Tistory / Designed by Tistory

티스토리툴바