You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In reality, snorf is meant to take three parameters, because that's what innerSnorf takes, and none of them are named args. Or maybe snorf is supposed to be used in a context where the fact that it's a function isn't important, like as a template literal tag. In these cases, I can't find a way to tell documentation to stop inferring that the documentation for snorf should include a parameter named args, short of changing the implementation of snorf to use arguments (which, in 2017, is way uncool).
Some ideas, in expected ascending order of complexity and flexibility:
An explicit @member, or other @kind not-a-function tag, could be a cue to skip inferring parameters?
Implement a custom tag @ignoreparameters?
A magic extension to @param, like @param {ignore} args or @param args - [ignore], for per-parameter suppression?
Discussion please! I would be happy to implement the proposal that is most popular.
The text was updated successfully, but these errors were encountered:
Sure! The JSDoc standard way to do this, which documentation.js supports, is using @name snorf. The @name tag tells documentation.js to skip all inference, so the documentation about the function is only exactly what you write as documentation tags, not affected at all by the code context. There's a little bit about this in troubleshooting.
Whether it should be feasible to disable some inference and whether this admittedly not-obvious signal to turn it off is good enough... I'd certainly be interested in a more straightforward way to override or disable inference.
Well, that sounds good enough... am I doing this wrong, or is this a bug?
test.js
/** * @name snorf */constsnorf=(...args)=>{};
documentation build test.js -f md
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->### Table of Contents-[snorf](#snorf)## snorf**Parameters**-`args`**...any**
Let's say I want to document
snorf
:In reality,
snorf
is meant to take three parameters, because that's whatinnerSnorf
takes, and none of them are namedargs
. Or maybesnorf
is supposed to be used in a context where the fact that it's a function isn't important, like as a template literal tag. In these cases, I can't find a way to telldocumentation
to stop inferring that the documentation forsnorf
should include a parameter namedargs
, short of changing the implementation ofsnorf
to usearguments
(which, in 2017, is way uncool).Some ideas, in expected ascending order of complexity and flexibility:
@member
, or other@kind not-a-function
tag, could be a cue to skip inferring parameters?@ignoreparameters
?@param
, like@param {ignore} args
or@param args - [ignore]
, for per-parameter suppression?Discussion please! I would be happy to implement the proposal that is most popular.
The text was updated successfully, but these errors were encountered: