diff --git a/src/oneof.js b/src/oneof.js index 508892f2a..c1a968435 100644 --- a/src/oneof.js +++ b/src/oneof.js @@ -36,13 +36,13 @@ function OneOf(name, fieldNames, options) { /** * Field names that belong to this oneof. - * @type {Array.} + * @type {string[]} */ this.oneof = fieldNames || []; // toJSON, marker /** * Fields that belong to this oneof and are possibly not yet added to its parent. - * @type {Array.} + * @type {Field[]} * @private */ this._fields = []; diff --git a/tests/oneof.js b/tests/oneof.js index cc3769be4..27ef0a338 100644 --- a/tests/oneof.js +++ b/tests/oneof.js @@ -14,7 +14,7 @@ tape.test("oneofs", function(test) { num: 1 }); test.equal(message.num, 1, "should initialize the last value"); - test.equal(message.kind, "num", "should reference the last value"); + test.equal(message.getKind(), "num", "should reference the last value"); message.setKind('num'); test.notOk(message.hasOwnProperty('str'), "should delete other values");