-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling parameters that include mapped types with Date
as a generic argument
#1596
Closed
2 of 4 tasks
Labels
Comments
Hello there veiper93 👋 Thank you for opening your very first issue in this project. We will try to get back to you as soon as we can.👀 |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An error is raised by invoking
npx tsoa spec-and-routes
when one of the endpoints within routers has a@Body()
parameter that includes a mapped type field withDate
as a generic argument. The error is introduced with thetsoa 6.0.0
version. It was not present up until and including thetsoa 5.1.1
version.Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
The following TypeScript code should be processed by
tsoa spec-and-routes
without any issue.Current Behavior
For a TypeScript code in the Expected Behavior section, primitive types
string
,number
, andboolean
do not cause the error. I also think that custom simple JavaScript classes do not cause the error. Standard JavaScriptDate
type, on the other hand, seems to be causing an error.The following error is returned by
tsoa spec-and-routes
.Steps to Reproduce
The bug should be easily reproducible using the code supplied in the Expected Behavior section.
There is also a devbox on codesandbox.io.
Context (Environment)
In addition to the devbox where
yarn
was used, the error persist on the local machine wherenpm
was used.Version of the library:
6.1.5
Version of NodeJS:
v20.5.0
The text was updated successfully, but these errors were encountered: