Skip to content

Don't include @exports for enums#1824

Merged
dcodeIO merged 1 commit intoprotobufjs:masterfrom
jolting:patch-1
Apr 24, 2026
Merged

Don't include @exports for enums#1824
dcodeIO merged 1 commit intoprotobufjs:masterfrom
jolting:patch-1

Conversation

@jolting
Copy link
Copy Markdown
Contributor

@jolting jolting commented Oct 12, 2022

jsdoc states :

Use the @exports tag when documenting JavaScript modules that export anything"
other than the "exports" object or the "module.exports" property.

It is not intended to be used to specify an export name. TLDR: There should be only one @exports per file. Maybe $root for non-es6 modules.
ES6 modules should use @module

The other @exports don't appear to be causing problems. However, they are incorrect as well.

Fixes #1414

jsdoc states :

> Use the @exports tag when documenting JavaScript modules that export anything"
> other than the "exports" object or the "module.exports" property.

It is not intended to be used to specify an export name.
TLDR: There should be only one `@exports` per file.
Maybe $root for non-es6 modules.
ES6 modules should use `@module`

The other `@exports` don't appear to be causing problems. However, they are incorrect as well.

Fixes protobufjs#1414
@VitalyName
Copy link
Copy Markdown

VitalyName commented Oct 25, 2022

I have tested it. It is really solves my issue where pbts does not generate interfaces for enum but use implements from interfases which does not exists.

@AlexeySource
Copy link
Copy Markdown

Good news! I have been waiting this fix for 2 years!

@VitalyName
Copy link
Copy Markdown

Also it fixes other my issue. Once I was surprised when building of my project was broken, despite the fact that I locked the dependency tree.
Fixes: #1413

Copy link
Copy Markdown

@theCodeMachine theCodeMachine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fixes the issue! I am able to generate typescript definitions correctly with this

buu700 added a commit to cyph/cyph that referenced this pull request Jul 30, 2023
@ayZagen
Copy link
Copy Markdown

ayZagen commented Aug 3, 2023

@bcoe @alexander-fenster please pardon my ping but what is preventing this pr from being merged?

@jaovitubr
Copy link
Copy Markdown

#1999

Copy link
Copy Markdown

@sfc-gh-pfinnigan sfc-gh-pfinnigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get this merged? Our team has to locally patch and build protobufjs. Let's merge this 1-line fix. Tagging @alexander-fenster @sofisl

@sfc-gh-danqliu
Copy link
Copy Markdown

yeah. our team has to locally path and build protobuffjs as well.

@dcodeIO dcodeIO merged commit eb256f0 into protobufjs:master Apr 24, 2026
@github-actions github-actions Bot mentioned this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing interfaces in typescript file ~probably is jsdoc issue~ [It is CLI issue]