We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pbts
@typedef
protobuf.js version: 7.3.0
Using @typedef definitions on static code generates invalid type syntax. Any property after the first declared property will be prefixed with let
let
/** * @typedef {Object} MyType * @property {string} prop1 * @property {number} prop2 * @property {number] prop3 */
When running pbts, this will be converted to:
type MyType = { prop1: string; let prop2: number; let prop3: number; }
This isn't valid type syntax.
The problem occurs here:
protobuf.js/cli/lib/tsd-jsdoc/publish.js
Lines 394 to 396 in 0a0cdb6
forEach passes (value, index), and writePropertys second argument declare will then be populated with index.
forEach
(value, index)
writeProperty
declare
index
Lines 400 to 404 in 0a0cdb6
Thus, the declare condition will be true for every element past array index 0.
The text was updated successfully, but these errors were encountered:
I'm happy to whip up a short PR to address the issue
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
protobuf.js version: 7.3.0
Using
@typedef
definitions on static code generates invalid type syntax.Any property after the first declared property will be prefixed with
let
When running
pbts
, this will be converted to:This isn't valid type syntax.
The problem occurs here:
protobuf.js/cli/lib/tsd-jsdoc/publish.js
Lines 394 to 396 in 0a0cdb6
forEach
passes(value, index)
, andwriteProperty
s second argumentdeclare
will then be populated withindex
.protobuf.js/cli/lib/tsd-jsdoc/publish.js
Lines 400 to 404 in 0a0cdb6
Thus, the
declare
condition will be true for every element past array index 0.The text was updated successfully, but these errors were encountered: