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
570
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
DevOps Agentで始めるAWS運用 〜フロンティアエージェントが変える運用の現場〜
nyankotaro
1
360
生成 AI × MCP で切り拓く次世代 SRE!自律型運用への挑戦と開発者体験の進化
_awache
0
190
社内 AI エージェント Synapse と セマンティックレイヤーの育て方
hiroakis
1
1.5k
LLMと共に進化するプロセスを目指して
ymatsuwitter
12
3.9k
10倍の生産性を実現するAI駆動並列エージェントのすべて
kumaiu
4
1.3k
脆弱性対応、どこで線を引くか
rymiyamoto
0
320
チームで実践する AI-DLC 思考の軌跡を残すチェックポイント設計
belongadmin
0
3.2k
Databricks における 生成AIガバナンスの実践
taka_aki
1
370
個人最適 から 全体最適 へ AI情報共有会・AIギルド・AI-DLC で進める カンリーの組織展開
rfdnxbro
0
2.1k
ポケモンの型をTypeScriptの型システムで表現してみた
subroh0508
0
360
2026TECHFRESH畢業分享會 - Lightning Talk - 打造精準高效的 MCP 設計模式與測試實務
line_developers_tw
PRO
0
590
NAB Show 2026 動画技術関連レポート / NAB Show 2026 Report
cyberagentdevelopers
PRO
0
150
Featured
See All Featured
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
Practical Orchestrator
shlominoach
191
11k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
160
Building Adaptive Systems
keathley
44
3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
How to Ace a Technical Interview
jacobian
281
24k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
850
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
390
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
150
Test your architecture with Archunit
thirion
1
2.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
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