Comments (6)
I'm confused: are you trying to document JavaScript? If you'd like to turn off inference, there's a troubleshooting topic for that - the gist is to use the name tag to turn off inference in a standard way.
from gulp-documentation.
Well, for gulp-documentation
this is off-topic, but the main issue is this:
/**
* getter
* @param {string} name var name
* @return {any} value
*/
/**
* setter
* @param {string} name var name
* @param {any} value value to set
* @param {integer} param1 first parameter
* @param {integer} param2 second parameter
* @return {any} value
*/
function test(name, value, param1, param2) {
if (arguments.length > 1) {
// set stuff
}
// get stuff
}
Now, when you generate the documentation, you get the following function definitions within the generated HTML:
// getter ( I don't want the variables to show up here )
test(name: string, value: any, param1: any, param2: any)
// setter
test(name: string, value: any, param1: integer, param2: integer)
It is simply inaccurate to have the definition of the getter.
from gulp-documentation.
Can you try using @name test
to avoid inference in this case?
from gulp-documentation.
That might be possible, yes. But on the other hand, then I'll be losing that object methods are always in a tree-like fashion below the object.
Also, with @name
, I suddenly have no argument list behind the method. Wouldn't it be possible to generate an argument list from the @param
s given? Also, overloaded constructors cause a whole class with all methods to be listed twice, not just the constructor.
from gulp-documentation.
You can use the @memberof
tag to add the tree structuring. Right now that's basically how this works: you can have inference, or you can turn it off, for a file with polyglot or for a function with @name
- there's no way to just infer membership but not params or type, etc - at this point. That functionality is planned, and if you'd like to expedite it, I'd happily accept a PR.
I'll see if a test case can confirm the loss of parameter lists for this example. That might be because there's no @function
tag either - re previous paragraph, that's also something that's inferred, so if you turn off inference, you'll need to declare types manually.
from gulp-documentation.
Wow thank you! This worked perfectly. Now my only problem is that overloaded constructor will re-create the same class with all members twice.
I have tried adding a @name
and @class
tag but still - classes with same name are created twice.
from gulp-documentation.
Related Issues (20)
- How might one go about configuring a project to automatically set the title? HOT 3
- The code generator has deoptimised the styling of "..." as it exceeds the max of "100KB" HOT 2
- Allow usage of custom instance of documentation.js HOT 1
- TypeError: Cannot read property 'forEach' of undefined HOT 17
- Ignores description
- Please add License file HOT 1
- how do i run for all my files? HOT 6
- Name inference repeatedly documents the same items HOT 8
- ES6 babel project: Cannot read property 'reduce' or 'forEach' of undefined HOT 2
- Pass config and theme options HOT 1
- An in-range update of vinyl is breaking the build 🚨 HOT 1
- An in-range update of lint-staged is breaking the build 🚨 HOT 14
- Project name and version not included in HTML output HOT 2
- An in-range update of husky is breaking the build 🚨
- An in-range update of standard-version is breaking the build 🚨 HOT 2
- An in-range update of prettier is breaking the build 🚨 HOT 24
- An in-range update of concat-stream is breaking the build 🚨 HOT 1
- Version 10 of node.js has been released
- options do not seem to be working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-documentation.