Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created document doesn't show any parameters of function. #358

Closed
Speakeroman opened this issue Apr 16, 2013 · 1 comment
Closed

Created document doesn't show any parameters of function. #358

Speakeroman opened this issue Apr 16, 2013 · 1 comment

Comments

@Speakeroman
Copy link

Example: There are several .js files with couple functions like:
no classes just function.

/**
* TestFunction - doing something.
* @param {String} strTest Test string.
* @return {Boolean} bRes Returned value.
*/
function TestFunction(strTest) {
//code ...
return bRes;
}

After JsDuck.exe created help file - no parameter strTest of function TestFunction in function description is present, only return value bRes with description.
Version: SDuck 5.0.0.beta2 also tried on earlier version and same result.

Does anyone used JSduck for functional frameworks(e.g using JSDuck for TestComplete) and got success or are there any workaround to get this work properly?

Same .js files work correctly with JSDoc toolkit and all data is shown, but JSDuck is still preferable to make it work.

Also additional question is there possibility to group function that are in same files without changes in code.

Thanks in advance for reply.

@nene
Copy link
Member

nene commented Apr 16, 2013

So, because your function begins with uppercase letter, JSDuck thinks it's in fact a class. You need to add @method tag to make JSDuck understand it correctly.

There are number of heuristics like this that JSDuck uses. So if your write code in a certain way, JSDuck will happily auto-detect lots of things for you. However if you use some drastically different coding style, it can be pain to use JSDuck.

JSDuck is specifically targeted towards Sencha JS frameworks. But it should generally work well when writing JavaScript in OOP-style. For functional it's probably not such a good fit. First off it forces you to organize your code into classes - you might not like that if you only want functions.

@nene nene closed this as completed Apr 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants