Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
SWC Transformerから見るTypeScript関数記述ベストプラクティス
Search
Kaito Fujimura
May 11, 2024
Technology
590
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
FOSS4Gを活用した自治体業務DXの試み
470715
0
150
LLM機能を自作して分かるSnowflake Cortex AIの強み
nayuts
0
350
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
5
1.2k
Deep Data Security 機能解説
oracle4engineer
PRO
2
760
契約書画像からの情報抽出に特化した視覚接地モデルを育てる話
sansantech
PRO
1
160
LocalStack を使ったサーバーレスアプリケーション開発 / Serverless Development with LocalStack
kakakakakku
1
370
Snapshot Testing in Practice: Predictable and Reliable SwiftUI Views
fespinoza
0
180
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
290
AI時代だからこそ推したい!Gitコマンド再入門
munakata
0
170
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
320
分析AIエージェントを育てる、動く環境を育てる
codatum
1
760
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
900
Featured
See All Featured
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
GitHub's CSS Performance
jonrohan
1033
470k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Optimising Largest Contentful Paint
csswizardry
37
4k
Designing for humans not robots
tammielis
254
26k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
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