Skip to Content
이펙티브 타입스크립트
book

이펙티브 타입스크립트

by Dan Vanderkam, Won Ho Jang
November 2021
Intermediate to advanced
364 pages
9h 52m
Korean
Insight
Content preview from 이펙티브 타입스크립트
TypeScript
89
아이템 16 number 인덱스 시그니처보다는 Array, 튜플, ArrayLike를 사용하기
(앞의 예제를 보면 조건부 타입(
?
연산자)이 등장합니다. 조건부 타입은 아이
템 50에서 자세히 다룹니다.)
󻭣󻩌
··
런타임 때까지 객체의 속성을 알 수 없을 경우에만(예를 들어 CSV 파일에서
로드하는 경우) 인덱스 시그니처를 사용하도록 합니다.
··
안전한 접근을 위해 인덱스 시그니처의 값 타입에
undefined
를 추가하는 것
을 고려해야 합니다.
··
가능하다면 인터페이스,
Record
, 매핑된 타입 같은 인덱스 시그니처보다 정
확한 타입을 사용하는 것이 좋습니다.
󻨓󻱃󼘫 󻱇󺡀󻝳󽴔󻞫󺋇󺞗󼅧󻇃󺞳󺝣󼝫󼧛
󺹋󽴔󻕻󻭸󼨧󺋿
자바스크립트는 이상하게 동작하기로 유명한 언어입니다. 그중 가장 악명 높
은 것은 암시적 타입 강제와 관련된 부분입니다.
> "0"
==
0
true
다행히도 암시적 타입 강제와 관련된 문제는 대부분
===
와
!==
를 사용해서 해
결이 가능합니다.
자바스크립트 객체 모델에도 이상한 부분들이 있으며, 이 중 일부는 타입스
크립트 타입 시스템으로 모델링되기 때문에 자바스크립트 객체 모델을 이해하
는 것이 중요합니다. 이미 아이템 10에서 다룬 객체 래퍼 타입에서 이러한 이
상한 특징을 살펴보았습니다. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

러닝 타입스크립트

러닝 타입스크립트

조시 골드버그
고성능 파이썬(2판)

고성능 파이썬(2판)

오현석, 미샤 고렐릭, 이안 오스발트
타입스크립트 프로그래밍

타입스크립트 프로그래밍

Boris Czerny, U Jung Eun

Publisher Resources

ISBN: 9788966263134