Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
ain't giving up type-safe Express
andoshin11
May 19, 2020
Technology
2
210
ain't giving up type-safe Express
andoshin11
May 19, 2020
Tweet
Share
More Decks by andoshin11
See All by andoshin11
andoshin11
0
160
andoshin11
0
320
andoshin11
0
140
andoshin11
0
700
andoshin11
8
1.1k
andoshin11
0
1.3k
andoshin11
0
44
andoshin11
14
6.6k
andoshin11
3
5.2k
Other Decks in Technology
See All in Technology
lambda
0
220
chomado
0
280
kazeburo
1
120
sogaoh
2
420
honai
9
5.7k
line_developers
PRO
1
320
legalforce
PRO
0
110
michigari
0
170
kema1015
0
560
charity
9
10k
ayatokura
0
240
finengine
0
300
Featured
See All Featured
searls
204
37k
caitiem20
311
17k
productmarketing
6
760
keathley
20
760
robhawkes
52
2.9k
stephaniewalter
262
11k
lara
590
61k
jakevdp
776
200k
hursman
107
9.3k
shlominoach
176
7.6k
shpigford
165
19k
jmmastey
10
690
Transcript
ain’t giving up type-safe Express @andoshin11 19. 5. 2020 #隅田川.js
Who am I ? hin Ando (a.k.a Andy) @andoshin11 -
Freelance Full- tack Developer - ype cript / Vue.js / eact / Go / uby / erraform / etc… - ❤ Code Generation!
ecent Works: typescript-error-reporter-action
ecent Works: vue-type-audit
Express with ype cript
What’s new with @types/express • Generic eq/ es ype •
H Methods Awareness (← my first contribution!!) • Generic uery arameter ype • Enhanced Middleware ype • Improved ame- ite Cookie options • and more...
oute handlers
None
oute handlers Dictionary ype bject ype any Can send anything
Mapping Handler ypes
Mapping Handler ypes
eparating Declaration Multiple handler types can be defined for different
paths
H Method Distinction eceives Method type as a Generic input
Am I really doing this...
Let the tools do their jobs!!
typed-oax
typed-oax Open API Open API AST TypeScript AST Handler Types(d.ts)
Generate Handler ypes using pen A I & A arser
typed-oax DEM