RobinTail / express-zod-api

A Typescript library to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.
https://ez.robintail.cz
MIT License
619 stars 30 forks source link

Feat: Support async functions by `.addOptions()` #1753

Closed RobinTail closed 5 months ago

RobinTail commented 5 months ago

I read the documentation and realized that it does not make sense for .addOptions just to proxy the static data. For that purpose one could just import the previously assigned const. That's it. What does make sense is to accept an async function by that method.

Static option will be deprecated and removed in v19.

coveralls-official[bot] commented 5 months ago

Coverage Status

coverage: 100.0%. remained the same when pulling c2b7747a3e070bb24691c2c2af24838276521a40 on async-add-options into 6343ffcfc59a2985bc89cdf904649667d8732b61 on master.