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
型があると何が嬉しいか
Search
uhyo
July 27, 2026
Technology
160
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
型があると何が嬉しいか
2026-07-27 [初心者歓迎] #雑LT_study
uhyo
July 27, 2026
More Decks by uhyo
See All by uhyo
Reactの設計論
uhyo
26
17k
Baseline対応のDOMの型定義を作った
uhyo
3
1k
AIのReact習熟度を測る
uhyo
2
1.1k
React、まだ楽しくて草
uhyo
7
5.2k
TypeScript 7.0の現在地と備え方
uhyo
6
3.9k
React 19時代のコンポーネント設計ベストプラクティス
uhyo
20
11k
型定義でAIと会話する:型を通じてAIに意図を伝えるテクニック
uhyo
1
120
タグ付きユニオン型を便利に使うテクニックとその注意点
uhyo
3
1.2k
ECMAScript仕様の最新動向: プロセスの変化と仕様のトレンド
uhyo
3
990
Other Decks in Technology
See All in Technology
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
120
Claude Code本は、どのように執筆チームで書かれたか
oikon48
1
360
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
940
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
160
ファミコンでPHPを動かす / PHP on the Famicom side b
tomzoh
0
140
AgentCoreで実践するハーネスエンジニアリング
yakumo
1
300
Classmethod Company Deck
satoshi7
0
100
宣言型部分更新は何を解決しどこへ向かうのか
shuta13
1
310
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
140
Cognition AI Japan - ウェビナー2_テストQA_運用監視
cogakira
0
130
転んだ話が背中を預ける理由になる / A_story_about_falling_down_gives_you_a_reason_to_watch_each_other_s_backs.pdf
pauli
3
360
予測不能な実行エージェントを安全にサクッと試せるサンドボックス環境の話
sansantech
PRO
1
150
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
260
Art, The Web, and Tiny UX
lynnandtonic
304
22k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Mobile First: as difficult as doing things right
swwweet
225
10k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Documentation Writing (for coders)
carmenintech
77
5.6k
Making the Leap to Tech Lead
cromwellryan
135
10k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Transcript
型があると何が嬉しいか 2026-07-27 [初心者歓迎] #雑LT_study
教科書的な答え 1. 高精度で素早いフィードバック – ユニットテストとの比較 • 型検査は理論的バックグラウンドがあり、信頼性が高い。 (関連ワード: 型システムの健全性) •
実際にプログラムを実行するよりは高速。(のはず) 2. 設計への寄与 – 型を前提とした設計 3. LSP等によるコーディング補助 2
教科書的な答え 1. 高精度で素早いフィードバック – ユニットテストとの比較 • 型検査は理論的バックグラウンドがあり、信頼性が高い。 (関連ワード: 型システムの健全性) •
実際にプログラムを実行するよりは高速。(のはず) AI時代だぞ? 2. 設計への寄与 – 型を前提とした設計 3. LSP等によるコーディング補助 3
実際にやってみた 4
今回の実験内容 • 9000行程度のTypeScriptプロジェクトを用意 (Claudeがスプレッドシート的なやつを作ってくれた) • 型を削除したJavaScript版を生成 • 両方でClaude Codeが同じタスクを行い、 コストを比較
(バグ修正、機能追加、リファクタリング) https://github.com/uhyo/types-experiments 5
実験設定 • TS版では型アノテーションあり + LSPを装備 • JS版ではLSPなし • Claude Sonnet
5使用(Haiku 4.5の結果もあるけど省略) • リファクタリング1, 機能追加2, バグ修正5 6
実験結果 タスク名 TSコスト JSコスト TS/JS比 Refactor-address-brand $1.75 $1.01 1.73 Feature-table-formulas
$3.95 $3.12 1.26 Feature-xlookup $2.59 $2.61 0.99 Bug-datedif-anniversary $0.29 $0.32 0.91 Bug-migration-field $0.62 $0.56 1.11 Bug-sheet-rename-refs $0.84 $0.94 0.90 Bug-table-resize-watchers $0.70 $0.80 0.87 Bug-stale-recalc (anchor) $0.61 $0.69 0.89 7
実験結果 • バグ調査タスクの多くで、コストが1割程度減。 • しかしTSがあると逆にコストが増えるケースも。 • 型の読み書きや型の整合性を合わせるコスト? 8
おわり • まあ型はあったほうがいいんじゃない? • もっと大規模なプロジェクトで実験してみたい • 気になることはAIで自分で実験してみよう 9