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
TSConfig Solution Style & subpath imports to sw...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
South
May 22, 2025
Programming
360
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TSConfig Solution Style & subpath imports to switch types on a per-file basis
South
May 22, 2025
More Decks by South
See All by South
Automating Web Accessibility Testing with AI Agents
maminami373
1
2k
JSConf JP 2022 introduce React Query
maminami373
2
7.4k
Front-end rearchitect SPA
maminami373
0
570
JSConf jp 2021 kaonavi front-end development in the monolithic service
maminami373
1
270
単体テストゼロからテスト文化を醸成させた話 / Fostering the testing culture
maminami373
0
2.5k
Other Decks in Programming
See All in Programming
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
270
スマート反転とウェブアクセシビリティ
camiha
0
200
App Intentsのビルドプロセスを支える技術
kntkymt
0
330
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
140
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
970
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
56
38k
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
150
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
1.2k
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
270
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
540
A2UI for Android: Safely Rendering AI-Generated UI with Jetpack Compose - DroidKaigi 2026
itsmedreamwalker
0
110
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
3
500
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
350
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
660
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
530
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Automating Front-end Workflow
addyosmani
1369
210k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
Transcript
TSConfig Solution Style & subpath imports でファイル単位で型を切り替える TSKaigi 2025 |
株式会社Gaudiy kotori
自己紹介 • kotori ( @maminami_minami) • 株式会社Gaudiy Enabling Team •
Love: 酒・アニメ・声優 • 趣味: お絵描き
Solution Style • 複数の tsconfig を用意 • 適用する設定をファイル毎に切り替え • Vite
の react-ts template でも採用
Subpath imports • import のパスを他のモジュールに 再マッピングする Node.js の機能 • package.json
imports フィールド に定義 • # で始まる必要がある
課題 Storybook でFragment Masking が 解除された Fragment Props を利用したい! w/
GraphQL Fragment Colocation
Fragment Colocation -> 使うデータは近くに宣言! Fragment Masking -> 宣言したデータだけ使えるように制限!
gql.tada • GraphQL を型安全に扱えるエコシステム • GraphQL Codegen と違い generate コマンドの実行なしで即時
に gql tag の変更を型推論可能に • TypeScript LSP Plugin として gql.tada/ts-plugin を tsconfig plugins フィールドに追加
詳しくは Gaudiy Tech Blog にて! https://techblog.gaudiy.com/entry/2024/08/15/113040
setup graphql w/ gql.tada
Storybook w/ Fragment
Storybook w/ Fragment gql.tada の maskFragments() でマスクして Props に渡さないと型エラー
Storybook w/ nested Fragment
Storybook w/ nested Fragment
Storybook w/ nested Fragment 😭 😇 重複したフィールド… 可読性…
Storybook w/ nested Fragment 理想
解決方法💪
Subpath imports
Solution Style
Storybook w/ nested Fragment 理想 型エラーにならない!型推論が効く!🥰 .stories.tsx 以外では Fragment Masking
が適用
まとめ
まとめ • gql.tada はいいゾ • Subpath imports は割と使えるので頭の片隅に置いてお くといいかも •
技術の掛け合わせで解決できる課題もあるので、引き出し を広げていこう