Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance typia.random<T>() and typia.misc.clone<T>() functions. #779

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

samchon
Copy link
Owner

@samchon samchon commented Aug 23, 2023

Until v5 update, typia.random<T>() function and typia.misc.clone<T>() functions returned Primitive<T> typed value, as I've designed it to utilize only for JSON purpose. However, in the JSON case, it does not support bigint, Date and Uint8Array cases.

By the way, developing Protocol Buffer features, I had to make a new type Resolved<T>, and it is much wider and generous than previous Primitive<T> type. Comparing two types, I think that Resolved<T> type is much suitable for typia.random<T>() and typia.misc.clone<T>() functions.

Therefore, change their functions' return type.

p.s) Documentation comments about Protocol Buffer also being added

Until v5 update, `typia.random<T>()` function and `typia.misc.clone<T>()` functions returned `Primitive<T>` typed value, as I've designed it to utilize only for JSON purpose. However, in the JSON case, it does not support `bigint`, `Date` and `Uint8Array` cases.

By the way, developing Protocol Buffer features, I had to make a new type `Resolved<T>`, and it is much wider and generous than previous `Primitive<T>` type. Comparing two types, I think that `Resolved<T>` type is much suitable for `typia.random<T>()` and `typia.misc.clone<T>()` functions.

Therefore, change their functions' return type.
@samchon samchon added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 23, 2023
@samchon samchon self-assigned this Aug 23, 2023
@samchon samchon merged commit ee4259a into v5.0 Aug 23, 2023
2 checks passed
@samchon samchon deleted the features/resolved branch August 25, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant