Skip to Content
Effective TypeScript 第2版 ―型システムの力を最大限に引き出す83項目
book

Effective TypeScript 第2版 ―型システムの力を最大限に引き出す83項目

by Dan Vanderkam, 今村 謙士
April 2025
Intermediate to advanced
448 pages
6h 50m
Japanese
O'Reilly Japan, Inc.
Content preview from Effective TypeScript 第2版 ―型システムの力を最大限に引き出す83項目

付録B推奨事項の実践法

今村 謙士

この付録は、日本語版のオリジナルです。本書では、TypeScriptでの開発に役立つさまざまなトピックが広範囲にわたって取り上げられています。この付録では、訳者が1つだけオリジナルの項目を書き足します。原著の珠玉の項目の数々と並んで、読者の助けとなることを願っています。

項目84 コンパイラーオプションやリンターを使ってコードに規約を適用する

本書を読んだら、書いてある内容を実践してみたいと思うでしょう。「項目54 テンプレートリテラル型を使ってDSLや文字列間の関係をモデリングする」で紹介されたような、テンプレートリテラル型の華やかなテクニックを実際のコードで使えたら(人によっては)気持ちいいでしょうが、少し難易度が高いかもしれません。もっとも実践しやすいのは、シンプルなべき、べからずの項目です。たとえば「項目9 型アノテーションを型アサーションより優先的に使用する」のアドバイスに従って、型アサーションを使わないようにする、などです。

ほとんどのソフトウェア開発者は、チームを組んで複数人でコードを書きます。チームの中の1人だけが本書のアドバイスに従ってコードを書いても、他の人たちがそれにならわなければあまり意味がありません。それぞれが自分の好きなようにコードを書いたら、一貫性がなく、支離滅裂で読みづらいコードができあがるでしょう。このため、多くのソフトウェア開発チームはコーディング規約を定めます。これにより、多くの人が関わるコードでも一貫性が保たれ読みやすくなり、チームに新しく参加したメンバーもコードの書き方に迷わなくて済みます。本書の各項目の推奨事項(べき、べからず)を実践するには、それをチームのコーディング規約に反映することが重要です。 ...

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

LLMのプロンプトエンジニアリング ―GitHub Copilotを生んだ開発者が教える生成AIアプリケーション開発

LLMのプロンプトエンジニアリング ―GitHub Copilotを生んだ開発者が教える生成AIアプリケーション開発

John Berryman, Albert Ziegler, 服部 佑樹, 佐藤 直生
JavaScript 第7版

JavaScript 第7版

David Flanagan, 村上 列
入門 Kubernetes

入門 Kubernetes

Kelsey Hightower, Brendan Burns, Joe Beda, 松浦 隼人

Publisher Resources

ISBN: 9784814401093Publisher Website