Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
型があると何が嬉しいか
Search
uhyo
July 27, 2026
Technology
73
2
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
Baseline対応のDOMの型定義を作った
uhyo
3
890
AIのReact習熟度を測る
uhyo
2
960
React、まだ楽しくて草
uhyo
7
4.9k
TypeScript 7.0の現在地と備え方
uhyo
6
3.7k
React 19時代のコンポーネント設計ベストプラクティス
uhyo
20
10k
型定義でAIと会話する:型を通じてAIに意図を伝えるテクニック
uhyo
1
110
タグ付きユニオン型を便利に使うテクニックとその注意点
uhyo
3
1.2k
ECMAScript仕様の最新動向: プロセスの変化と仕様のトレンド
uhyo
3
950
TypeScript 6.0で非推奨化されるオプションたち
uhyo
18
8.6k
Other Decks in Technology
See All in Technology
[RSJ26] Building a VLA Model Based on Self-Distilled Classification
keio_smilab
PRO
0
170
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
55k
Bet AI Day 2026丨AIを「使う」から、AIが「働く」へ ― LayerXが進める「組織AI」の社会実装
layerx
PRO
2
1.5k
AIで開発は速くなったのに、なぜ現場は楽にならないのか 〜あなたの組織のボトルネックを突き止めるワークショップ〜
jacopen
1
200
Webとヘルスデータ
yukukotani
0
120
GuardDuty 検知対応を DevOps Agent で効率化しようとしている話 / GuardDuty Investigations with DevOps Agent
masahirokawahara
1
140
Jetpack Compose で挑む新聞紙面UI ─ 複合ジェスチャー・ポリゴン記事領域・適応的ページ構成という3つの壁/droidkaigi2026
nikkei_engineer_recruiting
0
140
Azure App Service / Container Apps の組み込み認証
kuniteru
0
150
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
3
880
Does an AI Watermark Survive Translation?
machinetranslation
0
520
はじめてのDatabricks:技術者向けワークショップ / beginner-workshop
databricksjapan
PRO
0
110
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
77k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
10k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
440
Making Projects Easy
brettharned
120
6.7k
The Invisible Side of Design
smashingmag
301
52k
Technical Leadership for Architectural Decision Making
baasie
3
550
Ruling the World: When Life Gets Gamed
codingconduct
0
320
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
How GitHub (no longer) Works
holman
316
150k
So, you think you're a good person
axbom
PRO
2
2.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
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