Re: [Jsdoc-user] no jsdoc from valid javscript
Status: Inactive
Brought to you by:
mmathews
From: Henrik G. <sp...@ma...> - 2006-07-30 19:10:31
|
Gabriel Reid wrote: > On Thu, Jul 27, 2006 at 08:29:58AM +0200, Henrik Gemal wrote: > >> If I have valid JavaScript like this: >> >> var DED = function() { >> var private_var; >> function private_method() {} >> return { >> public_var: 1, >> public_method : function() {} >> }; >> }(); >> >> I dont get any jsdocs out: >> Loading sources from test.js >> Nothing to document, exiting >> What can I do? >> >> > > If you change the first line of this to: > > var DED = new function(){ > > then you should get results much closer to what you're expecting, > without changing the functionality of your JavaScript code. The "new" > keyword here is unfortunately an extra hint that the current incarnation > of JSDoc needs in order to document this code. > It's correct that if I use "new function", I no longer get no jsdocs. But if you try to generate JSDoc from: var bla = new function() { var priv = 1; return { tester : function() {}, } }(); The "tester" function isn't mentioned. Isn't this a bug? |