Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ain't giving up type-safe Express

ain't giving up type-safe Express

5c97d6b5611feeebc345c3e4742a05a8?s=128

andoshin11

May 19, 2020
Tweet

Transcript

  1. ain’t giving up
 type-safe Express
 @andoshin11
 19. 5. 2020
 #隅田川.js


  2. 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!

  3. ecent Works:
 typescript-error-reporter-action

  4. ecent Works:
 vue-type-audit

  5. Express with ype cript


  6. 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...

  7. oute handlers


  8. None
  9. oute handlers
 Dictionary ype
 bject ype
 any
 Can send anything


  10. Mapping Handler ypes


  11. Mapping Handler ypes


  12. eparating Declaration
 Multiple handler types can be defined for different

    paths

  13. H Method Distinction
 eceives Method type as a Generic input


  14. Am I really doing this...


  15. Let the tools do their jobs!!


  16. typed-oax


  17. typed-oax
 Open API Open API AST TypeScript AST Handler Types(d.ts)

    Generate Handler ypes using pen A I & A arser 

  18. typed-oax
 DEM