Closed Joaovitorsw closed 2 years ago
Can you list all the steps you have taken to reach this output? The commands?
Did you use this (https://github.com/PokeAPI/pokedex-promise-v2#development) as a reference?
Yeah I see the same issue actually when using npm
to install the package. The type file doesn't have any reference to ListEndpointOptions
because the src
folder which includes that interface isn't in the dist/src
folder.
I see that ListEndpointOptions
does have a type included in the typings file though, so perhaps the Main.ts
file should be modified to reference that one. I think modifying the methodStructure
object on lines 268 and 317 to replace type: 'ListEndpointOptions'
after it's included in the generatedMethod
to have it be PokeAPI.ListEndpointOptions
and then regenerating the index.d.ts
file should fix it. Something like:
methodStructure.parameters[0].type = "PokeAPI.ListEndpointOptions";
Hey, thanks for pointing this out! The problem is on line 74 of the TypesGenerator, it should be rootModule
and not namespace
, changing this should correct the issue and the structure in general
the project gave an error in the build due to a small detail it is generating only the last non-standard files and causes the build error, making a local change it is already able to build again