15P by xguru 2021-10-19 | favorite | 댓글 1개

- Readonly
ㅤ→ JS의 Array와 Object는 Reference라서 수정이 가능. 사이드 이펙트 줄이기
- Any vs Unknown
ㅤ→ 컴파일할 때 모르는 타입에 대한 강제 체크가 가능하게 any 대신 Unknown 사용하기
- Record로 객체 Typing 하기
ㅤ→ interface 대신 Record를 이용

HN 댓글에 추가로 나온 것들 https://news.ycombinator.com/item?id=28837181

- Utility Type 에 대해 알기
ㅤ→ https://www.typescriptlang.org/docs/handbook/utility-types.html
ㅤ→ 한국어 https://typescript-kr.github.io/pages/utility-types.html

- 함수에서 Sometype|undefined 대신 Sometype|null 리턴하기

- Indexed Access Types https://typescriptlang.org/docs/handbook/…