[ts] Literal, Union, Intersection Types
2022-12-24 07:41

[ts] Literal, Union, Intersection Types

1. Literal Types
=> const는 값을 변경할 수 없기 때문에 "Tom"으로 특정됨
=> let은 바꿀 수 있기에 string으로
2. 식별가능한 Union Type
interface Car {
name: ...

댓글