EvanLovely
10/28/2018 - 6:26 PM

JSDoc tags

/**
 * @type {{a: boolean, b: boolean, c: number}}
 */
var x = {a: true};
/**
 * @typedef {Object} SpecialType - creates a new type named 'SpecialType'
 * @property {string} prop1 - a string property of SpecialType
 * @property {number} prop2 - a number property of SpecialType
 * @property {number=} prop3 - an optional number property of SpecialType
 * @prop {number} [prop4] - an optional number property of SpecialType
 * @prop {number} [prop5=42] - an optional number property of SpecialType with default
 */
/** @type {SpecialType} */
const specialTypeObject;