Wrong type definition for OperationHandlerArray
See original GitHub issueHello,
When defining operations in typescript we can use the type Operation
which is either OperationFunction | OperationHandlerArray
.
The problem is that OperationHandlerArray
is an OperationFunction[]
. The apiDoc property becomes a property of every elements of the array instead of the whole array.
Here is the project @types/express-openapi
with the correct typing : https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/express-openapi/index.d.ts#L266
Is it possible to fix that typing issue ?
It prevents the use of apiDoc
on endpoints with middlewares.
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to overwrite incorrect TypeScript type definition installed ...
Say that I want to use dotenv module in my TypeScript project and install its .d.ts using npm install @types/dotenv --save . Then...
Read more >error TS2688: Cannot find type definition file for...random paths.
Basically anything that tries to do typescript gets a bunch of errors about not finding type definitions I never reference in any of...
Read more >TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them.
Read more >Override TypeScript type definition of npm package - YouTube
Your browser can't play this video. Learn more. Switch camera.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks @jsdevel ! Just noticed the new version 😃
thanks for the bump!