This question is very similar to another one on this site, except that there is one more restriction: I cannot modify the function that creates new functions.
Let's say we have an object named someObject
with a method called addMethod
that can be used to create new methods for this object like this:
someObject.addMethod( "methodName", function () {
// Do some stuff here
} );
I want to document someObject
using jsDoc, but I am not allowed to modify it except through the use of its addMethod function. Is there a way to do this?