Sometimes, JavaScript libraries use arguments.length variable to access arguments passed to a function. Saltarelle substitutes not specified optional arguments with their default values. This is good for C# code, however it is not convenient for JavaScript interop scenarios, as one mentioned.
Is there an attribute that could be specified on a method or a delegate that optional arguments are not passed or passed as undefined?
Currently, the only way I know is to create multiple overloads of a same function.
Sometimes, JavaScript libraries use
arguments.length
variable to access arguments passed to a function. Saltarelle substitutes not specified optional arguments with their default values. This is good for C# code, however it is not convenient for JavaScript interop scenarios, as one mentioned.Is there an attribute that could be specified on a method or a delegate that optional arguments are not passed or passed as
undefined
?Currently, the only way I know is to create multiple overloads of a same function.