Hello,

I have been using IIFE for all my javascript modules.
Now I tried to implement some automatic documentation using JSDOC. The 
documents were not being generated correctly, the parser was unable to find 
the clases, the methods and so on.

Then I realized that it was because all my code was inside an IIFE. I 
removed the IIFE wrapper and documentation worked flawlessly. 

I was fearing that modules stopped working, but for my surprise it worked. 
And they do because TW module system wraps everything into an IIFE, so 
probably my IIFE is not needed at all.

Some core modules are using an IIFE wrapper directly on their code, for 
example:

https://github.com/Jermolene/TiddlyWiki5/blob/086506012d98e9db34c7d96dc27aea249a9bdbc8/core/modules/startup/info.js

While some others don't.

Is this any reasoning behind this?
What's the correct approach?

Thanks and regards.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/e4e109b4-cad4-4af9-a69a-48b376f384d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to