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

Improve the appearance of the generated code #1208

Open
AlexRMU opened this issue Aug 8, 2024 · 2 comments
Open

Improve the appearance of the generated code #1208

AlexRMU opened this issue Aug 8, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@AlexRMU
Copy link
Contributor

AlexRMU commented Aug 8, 2024

  • copy both the current indentation and the level indentation size from the source code
  • use only multi-line comments so that they can be inserted anywhere
  • add a comment that this code has been generated
  • add a comment with the package version
  • change the order of the comparison ("string" === typeof input.name -> typeof input.name === "string")
  • for each field and element, add a comment with a path to it
  • for each tag and type, add a comment with the name and parameters of the tag
  • add comments for unions, etc.
  • add a comment with the name of the original function and type (typia.is<IMember & { ... }>)
  • do not use single line if statement, etc.
  • ...

The protobuf already has something:

`//${index !== null ? ` ${index} -> ` : ""}${object.name}`,

This will help you study the generated code, understand how it works, look for bugs, etc.

@samchon
Copy link
Owner

samchon commented Dec 2, 2024

"string" === typeof input.name is intended spec.

About other features, wait your contributions.

@samchon samchon removed their assignment Dec 2, 2024
@samchon samchon added the enhancement New feature or request label Dec 2, 2024
@AlexRMU
Copy link
Contributor Author

AlexRMU commented Dec 2, 2024

I'm sorry, I won't be able to help with this anytime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants