Wednesday, 17 May 2017

Is it possible to document a function in JSDoc that's not defined locally?

The basic pattern that I have a couple of times in my code is exports.thing = thingFromSomewhereElse, and I want to document the function members of thingFromSomewhereElse as though I had defined them myself. But I can't see how do do that without an actual thing.functionName = function() {...}. If I try to use the @callback tag, JSDoc classifies it as a type definition instead of a member. Is there a way to get it to properly display as an object member?



via murgatroid99

No comments:

Post a Comment