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
253
아이템 52 테스팅 타입의 함정에 주의하기
러링, mirroring)을 고려해 보는 것도 좋습니다. NodeJS 기반 타입스크립트 사
용자에게는 변화가 없지만, 웹 기반이나 자바스크립트 등 다른 모든 사용자에
게는 더 나은 사양을 제공할 수 있습니다.
다른 라이브러리의 타입이 아닌 구현에 의존하는 경우에도 동일한 기법을
적용할 수 있고 타입 의존성을 피할 수 있습니다. 그러나 프로젝트의 의존성이
다양해지고 필수 의존성이 추가됨에 따라 미러링 기법을 적용하기가 어려워집
니다. 다른 라이브러리의 타입 선언의 대부분을 추출해야 한다면, 차라리 명시
적으로
@types
의존성을 추가하는 게 낫습니다.
미러링 기법은 유닛 테스트와 상용 시스템 간의 의존성을 분리하는 데도 유
용합니다. 자세한 내용은 아이템 4의
getAuthors
예제를 참고하시길 바랍니다.
󻭣󻩌
··
필수가 아닌 의존성을 분리할 때는 구조적 타이핑을 사용하면 됩니다.
··
공개한 라이브러리를 사용하는 자바스크립트 사용자가
@types
의존성을 가
지지 않게 해야 합니다. 그리고 웹 개발자가 NodeJS 관련된 의존성을 가지
지 않게 해야 합니다.
󻨓󻱃󼘫 󼘛󻝳󼟔󽴔󼖏󻱔󻰧󽴔󼨷󻳤󻪟󽴔󻷋󻰧󼨧󺋿
프로젝트를 공개하려면 테스트 코드를 작성하는 것은 필수이며, 타입 선언도
테스트를 거쳐야 합니다. ...
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