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
SWC Transformerから見るTypeScript関数記述ベストプラクティス
Search
Kaito Fujimura
May 11, 2024
Technology
580
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
SWC Transformerから見るTypeScript関数記述ベストプラクティス
Kaito Fujimura
May 11, 2024
More Decks by Kaito Fujimura
See All by Kaito Fujimura
iPhone Eye Tracking機能から学ぶやさしいアクセシビリティ
fujiyamaorange
0
1.1k
Other Decks in Technology
See All in Technology
GoCon2026 - Open Source, Open World
sanposhiho
2
560
Bet AI Day 2026丨バクラク Autopilot、業務システムの再設計
layerx
PRO
2
1.6k
Where Is JetBrains AI Heading- — Central CLI, Air Alpha, and the Agentic Development Stack
x5gtrn
PRO
0
150
AIとペアプロを始める。人とのペアプロをやめる。ペアプロの良さを改めて知る。もっと好きになった。 / Rediscovering Pair Programming
honyanya
1
290
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
0
200
GuardDuty 検知対応を DevOps Agent で効率化しようとしている話 / GuardDuty Investigations with DevOps Agent
masahirokawahara
1
340
スクラムで身についていた動き方を、XPで捉え直してみた
codmoninc
PRO
1
310
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
0
890
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
410
Bet AI Day 2026丨Agentは、「金融」という巨大産業の何を変えられるのか
layerx
PRO
0
1.2k
Reactの設計論
uhyo
10
3k
omasushiというライブラリを作った
polidog
PRO
0
150
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.5k
Everyday Curiosity
cassininazir
0
310
Test your architecture with Archunit
thirion
2
2.4k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
A designer walks into a library…
pauljervisheath
211
25k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
Making Projects Easy
brettharned
120
6.7k
Exploring anti-patterns in Rails
aemeredith
3
500
Darren the Foodie - Storyboard
khoart
PRO
3
3.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Transcript
SWC Transformer TypeScript TSKaigi 2024 @fujiyamaorange
Pay / Biome Utility Types Pick Pay for Business fujiyamaorange
TypeScript SWC Transform emit
None
None
Function Expression Arrow Function Function Declaration
None
SWC Transformer
TypeScript SWC Transform emit
SWC ~Speedy Web Compiler~ Next.js 12 Rust Babel 17 Rust
SWC (TypeScript Babel )
SWC Transformer
React 3 ※React =JSX alt data-testid
Before After
Before After alt
Before After data-testid
None
TypeScript SWC Transform emit
20.93s 22.78s 22.59s Transform 12000 React cargo test --example --
--test-threads=1 Transform
SWC Transformer
I/O
20.93s 22.78s 22.59s 17.70s 19.56s 19.31s (Transform) 3.23s 3.22s 3.28s
Transform
Transform ( )
Transform
Transform SWC fork SWC create
Transform SWC fork SWC create
( ) parse 919.22ms 959.42ms 929.58ms 931.66ms transform 56.26ms 61.25ms
58.77ms 15.72ms emit 8.75s 9.70s 9.56s 7.22s all 20.93s 22.78s 22.59s 17.70s ※
TypeScript SWC Transform emit
emit e.#mtd_name(self) mtd_name SWC AST Node SWC 200 AST Node
( : →FnDecl)
FnDecl AST emit!
emit AST Node AST emit
None
TypeScript SWC Transform emit
None
TypeScript (function) (function expression) (Arrow function expressions) SWC SWC Next.js
Compiler Trait swc_ecma_visit::VisitMut TSKaigi Canva ~Gray Purple Isometric Elements & Mockups 5G Technology Technology Presentation~ carbon