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
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
780
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
How to train your dragon (web standard)
notwaldorf
96
6.9k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
700
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
270
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
440
Agile that works and the tools we love
rasmusluckow
331
22k
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を使った開発を効率化させる 型ライブラリの紹介をしました。
ご静聴ありがとうございました