Skip to content

fix: only declare decode opts if used - #206

Merged
achingbrain merged 3 commits into
mainfrom
fix/only-declare-opts-if-used
Sep 18, 2026
Merged

achingbrain merged 3 commits into
mainfrom
fix/only-declare-opts-if-used

Conversation

@achingbrain

Copy link
Copy Markdown
Member

Decode options are only used for repeated/map fields so only declare the opts variable in decode/stream functions if the message has repeated/map or sub-message fields, otherwise the generated code can fail linting checks for unused variables.

Fixes #130

Decode options are only used for repeated/map fields so only declare
the `opts` variable in decode/stream functions if the message has
repeated/map or sub-message fields, otherwise the generated code can
fail linting checks for unused variables.

Fixes #130
@achingbrain
achingbrain merged commit 545ca31 into main Sep 18, 2026
26 checks passed
@achingbrain
achingbrain deleted the fix/only-declare-opts-if-used branch September 18, 2026 07:46
github-actions Bot pushed a commit that referenced this pull request Sep 18, 2026
## [protons-v10.0.2](protons-10.0.1...protons-10.0.2) (2026-09-18)

### Bug Fixes

* only declare decode opts if used ([#206](#206)) ([545ca31](545ca31)), closes [#130](#130)
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version protons-v10.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Generated TypeScript files cause compilation errors due to unused variables

1 participant