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

fix: typescript errors for struct with optional=all #1008

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

UnderKoen
Copy link
Contributor

Fixes #578

Due to the use of the .foreach function TS has no context of the clue that struct.fields is definently not undefined.

@stephenh
Copy link
Owner

Hi @UnderKoen , thanks for the PR! Can you run yarn bin2ts in your local copy, and check those into the commit/PR?

Given that ts-proto's primary output is generated code, we go ahead and commit the generated code to the repo because it forms ts-protos regression suite.

Thanks!

@UnderKoen
Copy link
Contributor Author

@stephenh Thanks for the information. I have pushed that in the pr!

@stephenh
Copy link
Owner

@UnderKoen sorry, looks like just a formatting thing, if you don't mind fixing that? 🙏 Thanks!

@UnderKoen
Copy link
Contributor Author

@stephenh Done!

@stephenh
Copy link
Owner

Looks great, thanks @UnderKoen !

@stephenh stephenh merged commit e838e38 into stephenh:main Feb 28, 2024
6 checks passed
stephenh pushed a commit that referenced this pull request Feb 28, 2024
## [1.167.9](v1.167.8...v1.167.9) (2024-02-28)

### Bug Fixes

* typescript errors for struct with optional=all ([#1008](#1008)) ([e838e38](e838e38)), closes [#578](#578)
@stephenh
Copy link
Owner

🎉 This PR is included in version 1.167.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

lukealvoeiro added a commit that referenced this pull request Mar 12, 2024
* main:
  chore(release): 1.168.0 [skip ci]
  feat: allow `$type` to be optional (#1013)
  chore(release): 1.167.9 [skip ci]
  fix: typescript errors for struct with optional=all (#1008)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compile Error with structs and useOptionals=all
2 participants