What JSDoc?

Hi all:

I have this (pseudo) code:

/**
 * @param {Array<String>} myParam
 * 
 * @properties={typeid:24,uuid:"a49cad08-4573-4027-8d7d-ffa61f8871c7"}
 */
function myMethod(myParam)
{
   [...]
}

If I use the method like this:

myMethod(new Array('val1', 'val2'))

I receive this warning message:

The function myMethod(Array<String>) is not applicable for the arguments (Array<None>)

What JSDoc is needed?

Regards,

Hi Juan,

I’d say there’s nothing wrong, but the parser is not working well.
Which version of Servoy is this?

i’m testing v6.1.3.

Regards,

this is already relaxed for 6.1.4
by the way, the parser doesn’t know that that is a Array of string, because you just do a new with some arguments
if you want to do it that it sees it directly as an array of strings:

myMethod([‘val1’, ‘val2’])

I’ve changed myMethod(new Array(‘val1’, ‘val2’)) for myMethod([‘val1’, ‘val2’]) and it works without warnings.

Thanks!