Skip to content

jsdoc/require-property Correctness

What it does

Requires that all @typedef and @namespace tags have @property tags when their type is a plain object, Object, or PlainObject.

Why is this bad?

Object type should have properties defined.

Examples

Examples of incorrect code for this rule:

javascript
/**
 * @typedef {Object} SomeTypedef
 */

/**
 * @namespace {Object} SomeNamesoace
 */

Examples of correct code for this rule:

javascript
/**
 * @typedef {Object} SomeTypedef
 * @property {SomeType} propName Prop description
 */

/**
 * @typedef {object} Foo
 * @property someProp
 */

References

Released under the MIT License.