Comments (11)
It did fix the issue! 0 errors during build.
from express-zod-api.
Awesome, thank you for letting me know.
I'm going to release it then, @bobgubko
from express-zod-api.
Could you please provide the complete text of the error messages, @bobgubko ?
——
Continuation of the issue #952
from express-zod-api.
However in my case declarations cannot be disabled. Is there a way to make it work with declarations enabled or my only option is to stay on 9.* version?
No, I can fix it by exposing the types needed for you to keep the declarations, but I need to know which ones are missing.
For that I'd like to ask you to provide the complete error messages so I could help you, @bobgubko
from express-zod-api.
Here are the errors I'm getting:
Errors
error TS4023: Exported variable '[..]' has or is using name 'BasicSecurity' from external module "[...]/node_modules/express-zod-api/dist/index" but cannot be named.
error TS4023: Exported variable '[..]' has or is using name 'BearerSecurity' from external module "[...]/node_modules/express-zod-api/dist/index" but cannot be named.
error TS4023: Exported variable '[..]' has or is using name 'CommonConfig' from external module "[...]/node_modules/express-zod-api/dist/index" but cannot be named.
error TS4023: Exported variable '[..]' has or is using name 'CookieSecurity' from external module "[...]/node_modules/express-zod-api/dist/index" but cannot be named.
error TS4023: Exported variable '[..]' has or is using name 'CustomHeaderSecurity' from external module "[...]/node_modules/express-zod-api/dist/index" but cannot be named.
error TS4023: Exported variable '[..]' has or is using name 'InputSecurity' from external module "[...]/node_modules/express-zod-api/dist/index" but cannot be named.
error TS4023: Exported variable '[..]' has or is using name 'MiddlewareDefinition' from external module "[...]/node_modules/express-zod-api/dist/index" but cannot be named.
error TS4023: Exported variable '[..]' has or is using name 'OAuth2Security' from external module "[...]/node_modules/express-zod-api/dist/index" but cannot be named.
error TS4023: Exported variable '[..]' has or is using name 'OpenIdSecurity' from external module "[...]/node_modules/express-zod-api/dist/index" but cannot be named.
error TS4023: Exported variable '[..]' has or is using name 'ResultHandlerDefinition' from external module "[...]/node_modules/express-zod-api/dist/index" but cannot be named.
error TS4094: Property 'descriptions' of exported class expression may not be private or protected.
error TS4094: Property 'handler' of exported class expression may not be private or protected.
error TS4094: Property 'methods' of exported class expression may not be private or protected.
error TS4094: Property 'middlewares' of exported class expression may not be private or protected.
error TS4094: Property 'mimeTypes' of exported class expression may not be private or protected.
error TS4094: Property 'resultHandler' of exported class expression may not be private or protected.
error TS4094: Property 'schemas' of exported class expression may not be private or protected.
error TS4094: Property 'scopes' of exported class expression may not be private or protected.
error TS4094: Property 'siblingMethods' of exported class expression may not be private or protected.
error TS4094: Property 'statusCodes' of exported class expression may not be private or protected.
error TS4094: Property 'tags' of exported class expression may not be private or protected.
Isn't it easier to simply export all types used in the library so there's no need to worry about those errors?
from express-zod-api.
Thank you for elaborating, @bobgubko .
Isn't it easier to simply export all types used in the library so there's no need to worry about those errors?
I'm trying to be careful with what I export, because making backwards incompatible changes to the exposed entities is a breaking change requiring next major version according to SemVer.
TS4023
Ok. This is clear how to fix, exactly by exposing those types.
TS4094
This is weird. Need to do a research.
from express-zod-api.
What is your version of Typescript, @bobgubko ?
Question withdrawn.
I think I found a way to fix TS4094.
from express-zod-api.
Dear @bobgubko ,
could you please try version 12.1.0-beta2
and tell me if it fixes the issue?
from express-zod-api.
I am getting the same error for a different type (Metadata
):
error TS4023: Exported variable '[...]' has or is using name Metadata from external module '[...]node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]_exp_ul3mzpgqwyhnfja3iatztge55q/node_modules/express-zod-api/dist/index' but cannot be named.
from express-zod-api.
You should have created an issue for that, @alindsay55661 .
I may have not noticed your comment.
from express-zod-api.
Fixed in version 14.0.3, @alindsay55661
from express-zod-api.
Related Issues (20)
- allow to add annotations for routes for generated client HOT 1
- responseProps HOT 3
- 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
- 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
- Type regression from 16.1.0 to 16.2.0 HOT 3
- incorrect pattern field for openapi HOT 4
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.