samchon / nestia

NestJS Helper Libraries + TypeScript OpenAPI generator
https://nestia.io/
MIT License
1.8k stars 92 forks source link

Explicit return type of `random()` function. #795

Closed samchon closed 7 months ago

samchon commented 7 months ago

When generating SDK library with simulate option, @nestia/sdk had not written the random function's return type. Therefore, embedded simulator in the SDK library have utilized the implicit Resolved<T> function on the random() function.

By the way, if actual return type is extremely complicate and even union type being used, it was not possible to build the SDK library due to type resolution depth limit. To resolve the problem, @nestia/sdk must define the return type explictly, and user of @nestia/sdk must configure the primitive option to be false.

This PR is to solve the problem, by explicitly defining return type of the embedded simulator's random() function.