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
520
SWC Transformerから見るTypeScript関数記述ベストプラクティス
Kaito Fujimura
May 11, 2024
Tweet
Share
More Decks by Kaito Fujimura
See All by Kaito Fujimura
iPhone Eye Tracking機能から学ぶやさしいアクセシビリティ
fujiyamaorange
0
890
Other Decks in Technology
See All in Technology
LLMアプリの地上戦開発計画と運用実践 / 2025.10.15 GPU UNITE 2025
smiyawaki0820
1
640
ビズリーチ求職者検索におけるPLMとLLMの活用 / Search Engineering MEET UP_2-1
visional_engineering_and_design
1
160
能登半島災害現場エンジニアクロストーク 【JAWS FESTA 2025 in 金沢】
ditccsugii
0
900
Click A, Buy B: Rethinking Conversion Attribution in ECommerce Recommendations
lycorptech_jp
PRO
0
100
カンファレンスに託児サポートがあるということ / Having Childcare Support at Conferences
nobu09
1
620
20251010_HCCJP_AdaptiveCloudUpdates
sdosamut
0
140
RDS の負荷が高い場合に AWS で取りうる具体策 N 連発/a-series-of-specific-countermeasures-available-on-aws-when-rds-is-under-high-load
emiki
7
4.1k
OpenTelemetry が拡げる Gemini CLI の可観測性
phaya72
1
230
Implementing and Evaluating a High-Level Language with WasmGC and the Wasm Component Model: Scala’s Case
tanishiking
0
140
「改善」ってこれでいいんだっけ?
ukigmo_hiro
0
350
プレーリーカードを活用しよう❗❗デジタル名刺交換からはじまるイベント会場交流のススメ
tsukaman
0
180
物体検出モデルでシイタケの収穫時期を自動判定してみた。 #devio2025
lamaglama39
0
230
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
115
20k
KATA
mclloyd
PRO
32
15k
A better future with KSS
kneath
239
18k
Balancing Empowerment & Direction
lara
5
690
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
It's Worth the Effort
3n
187
28k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
What's in a price? How to price your products and services
michaelherold
246
12k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Site-Speed That Sticks
csswizardry
13
910
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