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
1
480
SWC Transformerから見るTypeScript関数記述ベストプラクティス
Kaito Fujimura
May 11, 2024
Tweet
Share
Other Decks in Technology
See All in Technology
LLM時代の検索
shibuiwilliam
1
120
面倒な作業はAIにおまかせ。Flutter開発をスマートに効率化
ruideengineer
0
260
LangSmith×Webhook連携で実現するプロンプトドリブンCI/CD
sergicalsix
1
230
スタートアップに選択肢を 〜生成AIを活用したセカンダリー事業への挑戦〜
nstock
0
180
第4回Snowflake 金融ユーザー会 Snowflake summit recap
tamaoki
1
280
What’s new in Android development tools
yanzm
0
310
OPENLOGI Company Profile
hr01
0
67k
AWS Organizations 新機能!マルチパーティ承認の紹介
yhana
1
280
american airlines®️ USA Contact Numbers: Complete 2025 Support Guide
supportflight
1
110
生まれ変わった AWS Security Hub (Preview) を紹介 #reInforce_osaka / reInforce New Security Hub
masahirokawahara
0
470
How Do I Contact HP Printer Support? [Full 2025 Guide for U.S. Businesses]
harrry1211
0
120
KubeCon + CloudNativeCon Japan 2025 Recap Opening & Choose Your Own Adventureシリーズまとめ
mmmatsuda
0
270
Featured
See All Featured
How to Ace a Technical Interview
jacobian
278
23k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Agile that works and the tools we love
rasmusluckow
329
21k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
How STYLIGHT went responsive
nonsquared
100
5.6k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
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