Closed that-ambuj closed 4 days ago
I found a Hack, I can pass the .promise
field as the promise required.
This is kind of a gotcha that had me for the last 2 hours. I hope you mention it in the docs.
@that-ambuj You could try using the new Fetch API client?
I did not pass any --client
option to the script, it's the default one right?
In fact, @hey-api/openapi-ts still generates a legacy Fetch API client by default. You can generate other legacy clients with the client config option.
@mrlubos This is kind of confusing, don't you think?
Description
The generated
CancelablePromise
does not work with React Suspense. I think the issue is that the type does not serialize properly after being completed. The reason could be that this custom type is not compatible with different runtimes or react only works with the traditional Promise type.Is there any way I can generated code that returns a regular
Promise<T>
instead ofCancelablePromise<T>
?OpenAPI specification (optional)
No response
Configuration
No response
System information (optional)
No response