Generating Types without climbing a tree [eng]

How do you generate types dynamically? How do you write a script that creates some typescript code? The approach most people would recommend is to use Abstract Syntax Tree manipulations. I was working on a deadline to implement types for our OpenAPI client, and I would have missed our release window. I needed something different and easier to build. Luckily, a friend recommended me a library I didn't know: code-block-writer. I fall in love with it at first sight.

Matteo Collina
Platformatic.dev
  • Co-Founder and CTO of Platformatic.dev
  • Matteo is also a prolific Open Source author in the JavaScript ecosystem and modules he maintain are downloaded more than 17 billion times a year
  • Member of the Node.js Technical Steering Committee focusing on streams, diagnostics and http
  • He is also the author of the fast logger Pino and of the Fastify web framework
  • Matteo is an renowed international speaker after more than 60 conferences
  • Twitter, LinkedIn, YouTube, Twitch
Увійти
Або поштою
Увійти
Або поштою
Реєстрація через e-mail
Реєстрація через e-mail
Забули пароль?