Comments (3)
I'm going to add a notice to the Changelog in order to inform others on that risk
from express-zod-api.
Hello @frankdejonge ,
thank you for informing me.
const factory = new EndpointsFactory<IOSchema, typeof ErrorResponse>(resultHandler); // ^ cannot compile const factory = new EndpointsFactory(resultHandler); // ^ can compile
It could be that our use of this library was not done in the intended way,
Yes, the generic type parameters of EndpointsFactory
class are not supposed to be manually defined by consumer. Instead they are supposed to be inferred from the arguments you supply to the constructor itself.
Some of them were actually redundant and I removed them in v16.2.0, but since you had them explicitly specified, it causes the issue for the compilation.
For the complete clarity:
new EndpointsFactory(...)
✅ correct usagenew EndpointsFactory<...>(...)
❌ incorrect usage
Thank you for letting me know.
from express-zod-api.
Understood! Thank you for the quick response and the wonderful library 👋
from express-zod-api.
Related Issues (20)
- ez.upload() does not work for attached express aplications. HOT 1
- `ez.upload()` does not work with `.attachRouting()` HOT 4
- Type error: `BearerSecurity` cannot be named HOT 4
- Make `winston` a peer
- Problem to create routings HOT 5
- Can't use .z.ZodArray as output schema HOT 6
- Task: Restore SWC for `ts-node` when new version released
- Specifying input headers HOT 8
- TypeScript errors TS4023, TS4094 HOT 11
- Multiple servers in Swagger HOT 2
- Export request/response types from generated client HOT 5
- Listening to a configurable hostname HOT 1
- Insufficient types export (TS4023) of `Metadata` HOT 1
- Task: fix NPM warning during publishing
- Cannot create multiple errors response when generate Document
- Set schema name using withMeta
- incorrect pattern field for openapi HOT 4
- What tool did you use to make the handdrawn diagram?
- OpenApi yaml spec has wrong minimum value for doubles HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from express-zod-api.