Closed jchantrell closed 6 months ago
Hello there jchantrell 👋
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
Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
I am running
npx tsoa routes
and it's throwing with this error:There was a problem resolving type of 'MyType'.
which is an interface declared by another package. It fails for all interfaces that include it as a reference. Shape of the interface and additional error info below.Current Behavior
It is throwing errors any time a typescript
Map<string, any>
type is mentioned in an interface.Possible Solution
I have stepped through the functions that are handling it and have determined that it's failing while parsing the
Map<string, any>
property ofMyType
. It seems that there is code that filters down types that belong to typescript which makes theMap
type return with no type declarations. Those declarations are returned as an array then the first element of that array is passed into another handler that's causing this error to be thrown.The code that is filtering down the native typescript types and returning an empty array: https://github.com/lukeautry/tsoa/blob/daadfe6279290bb9729423ac9d56b9518d70ee18/packages/cli/src/metadataGeneration/typeResolver.ts#L1214-L1221
The code where it's returned to that throws the error: https://github.com/lukeautry/tsoa/blob/daadfe6279290bb9729423ac9d56b9518d70ee18/packages/cli/src/metadataGeneration/typeResolver.ts#L696-L711
Steps to Reproduce
yarn run tsoa routes
User
interface from the tutorial with aMap<string, any>
Context (Environment)
Version of the library: 6.0.1 Version of NodeJS: 18
Detailed Description
Apologies if I am missing something obvious.
Breaking change?
nil