Is there a way to loosely specify what type of objects should be inside the object you're documenting?
I'm looking to document an object of the following:
var obj = {
unknownName1: {
name: "KnownValue"
},
unknownName2: {
name: "KnownValue",
offset: {
x: 0,
y: 0
}
},
unknownName3: {
name: "KnownValue",
offset: {
x: 0,
y: 0
},
visible: true
},
unknownName4: {
name: "KnownValue"
}
};
The sub objects should have the following properties:
/**
* Example Object
* @typedef myObject
* @type {Object}
* @property {String} name - Name of the templated object
* @property {Number} [offset.x] - Offset X
* @property {Number} [offset.y] - Offset Y
* @property {Boolean} [visible] - Is Visible
* @memberof com.namespace.MyClass
*/
If I wanted to document this specific obj
I would do the following, but the object will be dynamically generated with an unknown number of objects of unknown name with the type of com.namespace.MyClass
/**
* Object of Special Objects
* @typedef mySpecialObjectOfObjects
* @type {Object}
* @property {com.namespace.MyClass.myObject} unknownName1
* @property {com.namespace.MyClass.myObject} unknownName2
* @property {com.namespace.MyClass.myObject} unknownName3
* @property {com.namespace.MyClass.myObject} unknownName4
* @memberof com.namespace.MyClass
*/
P.S. I'm just looking for a wildcard @property
that can be used so my editor can help me remember all the options available for each sub-object inside the object.