optional property
- 의도적으로 어떤 객체의 property가 있을수도 있고, 없을수도 있는 경우에는 '?' 를 사용한다
- 어떤 property이던지 추가로 뭔가 설정할 수 있는 형태로 타이핑을 해야한다면 index 타입을 사용한다
interface 3종류
- class implements interface
객체 지향에서 많이 사용되는 방법
- interface extends interface
interface를 가져와서 추가적으로 추가할 interface만 추가하는 방식인 상속
- function interface
함수에 대해서 interface로 만들어내는 방식
Readonly Interface Properties
- Interface Properties에 Readonly property를 사용하는 방식
- Interface를 만들때 어떤 property가 한번 생성 후 바뀌지 않는 값이라면 항상 Readonly를 붙여주기
type alias vs interface
- type alias 어떤 타입을 부르는 이름
- interface 어떤 새로운 타입을 만들어 내는것