JSDoc error? Argument type null is not assignable to parameter type string.

I'm getting a warning in my Javascript code that I'm afraid I don't understand. If you create the following:

/**
* @param {string} aParam Some parameter.
*/
function myFunction(aParam) {

}
myFunction(null);

The IDEA displays a warning on the "null" saying "Argument type null is not assignable to parameter type string". If I change the case of the type in the JSDoc from {string} to {String} then the warning goes away. I'm somewhat new to Javascript but this seems like it should be a legitimate method call and that this warning is a bug. Am I missing something?

I'm running IDEA 2016.2 #IU-162.1121.32.

Please sign in to leave a comment.