jsctags
Version:
jsctags generator
26 lines (18 loc) • 398 B
JavaScript
var o = {};
// Docstring for prop1
Object.defineProperty(o, "prop1", {
get: function() { return "hi"; }
});
Object.defineProperty(o, "prop2", {
value: 100
});
o.prop1; //: string
o.prop2; //: number
o.prop1; //doc: Docstring for prop1
var o2 = {};
Object.defineProperties(o2, {
prop1: {get: function() { return 2; }},
prop2: {value: true}
});
o2.prop1; //: number
o2.prop2; //: bool