Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
TypeScript開発を効率化させるためのおすすめ型ライブラリ3選
Search
井上倖太朗
March 05, 2023
1.1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TypeScript開発を効率化させるためのおすすめ型ライブラリ3選
2023.03.02 MixLeap Live Study #70 - 教えて!みんなのTypeScript LT登壇資料
井上倖太朗
March 05, 2023
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
290
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Between Models and Reality
mayunak
4
460
A Modern Web Designer's Workflow
chriscoyier
699
190k
Docker and Python
trallard
47
4.2k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
470
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
Color Theory Basics | Prateek | Gurzu
gurzu
1
470
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
360
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
Transcript
TypeScript開発を効率化させるための おすすめ型ライブラリ3選 2023.03.02 MixLeap Live Study #70 - 教えて!みんなのTypeScript
©︎ 2023 Gemcook, Inc. 自己紹介 名前 経歴 昨年8月から、株式会社Gemcookにインターンとして ジョイン 。React,
TypeScriptを使ったフロントエンド 開発に従事。 関西学院大学 法学部 政治学科 4年 (今年4月~) 井上 倖太朗 出身 東京都府中市出身
型ライブラリを紹介しようと思った背景 ・単純に記述量も増える。 ・型による安全性は担保しつつ、型定義はなるべく最小限の労力で行なってメインとなる実装に より多く時間を使いたいというのが個人的な思い。 ・実装に加えて、型も同時に定義していかなくてはいけないので、考えることが増える。 TypeScriptのような静的型付け言語では、多くの利点がある一方で、 静的型付けにはいくつか「しんどいな」と感じる側面もあると思っている。
ライブラリを導入して 少しでも開発効率を高められないだろうか?
便利な型ライブラリ3選 ・ts-essentials ・ts-toolbelt ・type-fest GithubのStar数: 5.4k (2023.2.26日時点) GithubのStar数: 10.2k (2023.2.26日時点)
GithubのStar数: 2.9k (2023.2.26日時点) 何が嬉しい? 具体的に何ができる? (一部紹介) ・TypeScriptの標準機能にはない型定義を提供しており、より柔軟な開発が可能 (ユーティリティタイプでは足りないようなケースに対応) ・型を一から自作する必要がないため、工数削減できる。 Ý オブジェクトの一部のプロパティのみ省略可能にする。 Ý スネークケースやケバブケースの命名規則をキャメルケースに変換する。 Ý ネストされたオブジェクトのプロパティを readonly (読み取り専用) にする。
ts-toolbeltのコード例を紹介 方法3 (ts-toolbeltならスッキリ!) ・ts-toolbeltでオブジェクトの一部のプロパティのみ省略可能にするコード例です! オブジェクトの一部プロパティをオプショナルにして定義したい。 方法2 (んー。なんか冗長) 方法1 (んー。なんかわかりづらい)
まとめ ©︎ 2023 Gemcook, Inc. a ライブラリにはさまざまな型ユーティリティが用意 されていて、複雑で高度な型の定義も簡単に実現する ことが可能です。 a
長期的に見て開発効率を重視するのであれば、 ライブラリを検討してみるのもありだと思います。 (導入コストが低い+メンテナンスコストも減る) a TypeScriptを使った開発を効率化させる 型ライブラリの紹介をしました。
ご静聴ありがとうございました