Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
530
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
960
Other Decks in Technology
See All in Technology
Gemini でコードレビュー知見を見える化
zozotech
PRO
1
250
[JAWS-UG 横浜支部 #91]DevOps Agent vs CloudWatch Investigations -比較と実践-
sh_fk2
1
250
regrowth_tokyo_2025_securityagent
hiashisan
0
230
生成AIでテスト設計はどこまでできる? 「テスト粒度」を操るテーラリング術
shota_kusaba
0
710
Power of Kiro : あなたの㌔はパワステ搭載ですか?
r3_yamauchi
PRO
0
100
大企業でもできる!ボトムアップで拡大させるプラットフォームの作り方
findy_eventslides
1
740
mairuでつくるクレデンシャルレス開発環境 / Credential-less development environment using Mailru
mirakui
1
120
今からでも間に合う!速習Devin入門とその活用方法
ismk
1
670
生成AI活用の型ハンズオン〜顧客課題起点で設計する7つのステップ
yushin_n
0
140
多様なデジタルアイデンティティを攻撃からどうやって守るのか / 20251212
ayokura
0
430
Playwrightのソースコードに見る、自動テストを自動で書く技術
yusukeiwaki
13
5.3k
エンジニアリングをやめたくないので問い続ける
estie
2
1.2k
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Site-Speed That Sticks
csswizardry
13
1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
4 Signs Your Business is Dying
shpigford
186
22k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Producing Creativity
orderedlist
PRO
348
40k
A Tale of Four Properties
chriscoyier
162
23k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Speed Design
sergeychernyshev
33
1.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
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