일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Python
- 알고리즘
- 코드스테이츠
- Operating System
- execution context
- 파이썬
- java
- 운영체제
- 자료구조
- useState
- JavaScript
- 컴퓨터공학
- codestates
- 자바
- react 기초
- Zerobase
- Computer Science
- REACT
- 자바스크립트
- context switching
- datastructure
- algorithm
- node.js
- 비동기
- 파이썬 알고리즘 인터뷰
- python algorithm
- 프로그래머스
- OS
- Props
- 개발공부
Archives
- Today
- Total
목록type aliase (1)
Back to the Basics
[typescript] Type VS Interface
ts 공부를 하던 중 문득 궁금한 것이 생겼다. type 과 Interface는 둘 다 type을 정의할 때 사용될 수 있고 사용한다. 그럼 언제 type을 사용하고 언제 interface를 사용할까? 이를 확인해보기 위해 type과 interface 의 공통적인 부분화 다른 부분을 알아보고 언제 무엇을 사용하는 것이 좋은지 알아보자 type과 interface 공통적인 부분 1. type과 interface 둘 다 객체를 만들 수 있다. type TAnimal = { name: string; age: number; speak?: () => void; }; const dog: IAnimal = { name: '구쟁', age: 1, speak: () => console.log('멍멍'), }; const..
Language/Typescript & NestJS
2024. 1. 7. 18:50