ain’t giving up
type-safe Express
@andoshin11
19. 5. 2020
#隅田川.js
Slide 2
Slide 2 text
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!
Slide 3
Slide 3 text
ecent Works:
typescript-error-reporter-action
Slide 4
Slide 4 text
ecent Works:
vue-type-audit
Slide 5
Slide 5 text
Express with ype cript
Slide 6
Slide 6 text
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...
Slide 7
Slide 7 text
oute handlers
Slide 8
Slide 8 text
No content
Slide 9
Slide 9 text
oute handlers
Dictionary ype
bject ype
any
Can send anything
Slide 10
Slide 10 text
Mapping Handler ypes
Slide 11
Slide 11 text
Mapping Handler ypes
Slide 12
Slide 12 text
eparating Declaration
Multiple handler types can
be defined for different
paths
Slide 13
Slide 13 text
H Method Distinction
eceives Method type as a
Generic input
Slide 14
Slide 14 text
Am I really doing this...
Slide 15
Slide 15 text
Let the tools do their jobs!!
Slide 16
Slide 16 text
typed-oax
Slide 17
Slide 17 text
typed-oax
Open API
Open API AST
TypeScript AST
Handler Types(d.ts)
Generate Handler ypes using pen
A I & A arser