jscs-jsdoc icon indicating copy to clipboard operation
jscs-jsdoc copied to clipboard

Parameter type validation for JSDuck should allow '/' as well as '|' as a value seperator

Open jdforrester opened this issue 10 years ago • 3 comments

Per the JSDuck documentation, values can be separated by either '|' or '/'. However, only the first of these works.

jdforrester avatar Aug 04 '15 02:08 jdforrester

Thanks, nice catch!

Whichever you choose, be consistent within your project.

Need to make some option for types parsing algorithm to use '/' instead of '|'. What you think if we just replace '/' to '|' for JSDuck (or if option is set)?

qfox avatar Aug 04 '15 10:08 qfox

Need to make some option for types parsing algorithm to use '/' instead of '|'. What you think if we just replace '/' to '|' for JSDuck (or if option is set)?

We use '|' not '/' (I only noticed it when looking for other issues ;-)), so I'd love not only understanding both (which to looks like https://github.com/Kuniwak/jsdoctypeparser/pull/21 fixes) but having the style enforce one or the other for consistency, yeah – but should that be a follow-up (wishlist) issue?

jdforrester avatar Aug 05 '15 19:08 jdforrester

@jdforrester Yeah, thanks for clarifying that. For now it looks like complicated task cuz we also need some info about used delimiter to check it. Don't see how to check it easily with regexps or something else. Anyway, it's a good idea ;-)

qfox avatar Aug 05 '15 19:08 qfox