dox icon indicating copy to clipboard operation
dox copied to clipboard

`*` type ignored

Open tomek-he-him opened this issue 10 years ago • 2 comments

$ cat <<——— | dox  --raw --debug
/**
 * @param {(String|Number|*)} a
 */
———
[ { tags: 
     [ { type: 'param',
         string: '{(String|Number|*)} a',
         types: [ 'String', 'Number' ],
         /* … */ } ],
     /* … */ } ]

When I pipe @param {*} a in, I get types: [].

tomek-he-him avatar Jun 25 '15 08:06 tomek-he-him

I'm fairly certain you'll need to take this one to jsdoctypeparser. Also, isn't the proper nomenclature mixed to denote that it can take anything?

Twipped avatar Jun 25 '15 15:06 Twipped

I haven’t seen any real standard for such things, but http://usejsdoc.org/tags-param.html says {*}.

Personally I’m using the convention {(String|*)} to say that I take any type but it’ll be cast to string. But if there is a standard way to describe that, I’m open.

tomek-he-him avatar Jun 25 '15 15:06 tomek-he-him