Fix template for parameter types in callbacks#50
Conversation
Support for multiple types (like 'Number or String') in callback signatures. Se for example signatures in documentation for jQuery.map.
|
jQuery.map() has an incorrect signature. |
|
jQuery.map() was a bad example since there was an error in how the signature was described. ".prop( propertyName, function(index, oldPropertyValue) )" is a better example, since the callback can receive multiple different types depending on the property requested. So we need to be able to show "union"-types in callback signatures, just as with ordinary parameters and return values. |
|
I don't see how listing every single data type provides any benefit. We should use a meta type like Mixed or Any. |
|
Do you mean in the general case, or just in the case of "prop()"? I think I agree with you in the case of "prop()", since properties can be many different types (e.g. "ownerDocument" is a Document for example, so at least four different types.). But this is really an issue regarding the documentation of specific methods. This commit is just a general xslt fix so that multi-types is rendered the same way in callback signatures as in other parameters. |
|
I refuse to land a change without a specific example of where the functionality is needed. |
Support for multiple types (like 'Number or String') in callback
signatures. See for example signatures in documentation for jQuery.map.