Skip to content

Commit

Permalink
fix(types): bring back Field.rule to .d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster committed Apr 30, 2021
1 parent a2ccda1 commit da9fdd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ function Field(name, id, type, rule, extend, options, comment) {
if (extend !== undefined && !util.isString(extend))
throw TypeError("extend must be a string");

if (rule === "proto3_optional") {
rule = "optional";
}
/**
* Field rule, if any.
* @type {string|undefined}
*/
if (rule === "proto3_optional") {
rule = "optional";
}
this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON

/**
Expand Down

0 comments on commit da9fdd2

Please sign in to comment.