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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kaito Fujimura
May 11, 2024
Technology
550
1
Share
SWC Transformerから見るTypeScript関数記述ベストプラクティス
Kaito Fujimura
May 11, 2024
More Decks by Kaito Fujimura
See All by Kaito Fujimura
iPhone Eye Tracking機能から学ぶやさしいアクセシビリティ
fujiyamaorange
0
1k
Other Decks in Technology
See All in Technology
Rapid Start: Faster Internet Connections, with Ruby's Help
kazuho
2
940
GKE Agent SandboxでAIが生成したコードを 安全に実行してみた
lamaglama39
0
140
Hacobu Tech Deck
hacobu
PRO
0
140
AIが書いたコードを信じられない問題 〜レビュー負荷を下げるために変えたこと〜 / The AI Code Trust Gap: Reducing the Review Burden
bitkey
PRO
8
1.4k
ハーネスエンジニアリングの概要と設計思想
sergicalsix
9
6.4k
ServiceNow Knowledge 26 の歩き方
manarobot
0
250
20260428_Product Management Summit_Loglass_JoeHirose
loglassjoe
4
5.1k
GitHub Copilot CLI と VS Code Agent Mode の使い分け
tomokusaba
0
110
「責任あるAIエージェント」こそ自社で開発しよう!
minorun365
10
2.6k
はじめての MagicPod生成AI機能 機能紹介から活用方法まで
magicpod
0
120
Angular Architecture Revisited Modernizing Angular Architectural Patterns
rainerhahnekamp
0
100
UIライブラリに依存しすぎないReact Native設計を目指して
grandbig
0
160
Featured
See All Featured
Docker and Python
trallard
47
3.8k
Building AI with AI
inesmontani
PRO
1
930
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
330
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
110
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
170
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
WENDY [Excerpt]
tessaabrams
10
37k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
140
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