micmath/jsdoc — Issue #81: Top-level return statements fail in module context
Author: tstatler
Created: 2012-01-24 22:54:36+00:00
State: open

I'm documenting a CommonJS module that contains these two lines outside of a function:

if (typeof window === "undefined")
return;

This generates the following JSDoc error:

js: "ignore/test.js", line 2: invalid return
js: return;
js: ..........^

I guess ideally this would be a non-fatal warning, instead of generating an error.