You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
used the search to make sure that a similar issue hasn't already been submit
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.
There was a problem resolving type of 'MyType'.
Generate routes error.
TypeError: Cannot read properties of undefined (reading 'kind')
at Object.isEnumMember
...
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 of MyType. It seems that there is code that filters down types that belong to typescript which makes the Map 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:
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:
tsoa/packages/cli/src/metadataGeneration/typeResolver.ts
Lines 1214 to 1221 in daadfe6
The code where it's returned to that throws the error:
tsoa/packages/cli/src/metadataGeneration/typeResolver.ts
Lines 696 to 711 in daadfe6
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
The text was updated successfully, but these errors were encountered: