Comparing version 6.0.1 to 6.0.2
@@ -56,2 +56,3 @@ "use strict"; | ||
const parameterConversions = Parameters.generateOverloadConversions(overloads, this.obj.opts.customTypes); | ||
const argsSpread = parameterConversions.hasArgs ? "...args" : ""; | ||
Object.assign(requires, parameterConversions.requires); | ||
@@ -61,7 +62,7 @@ str += parameterConversions.body; | ||
str += ` | ||
return ${callOn}.${name}.apply(${callOn}, args); | ||
return ${callOn}.${name}(${argsSpread}); | ||
};\n`; | ||
} else { | ||
str += ` | ||
return utils.tryWrapperForImpl(${callOn}.${name}.apply(${callOn}, args)); | ||
return utils.tryWrapperForImpl(${callOn}.${name}(${argsSpread})); | ||
};\n`; | ||
@@ -73,3 +74,3 @@ } | ||
str += ` | ||
return ${callOn}.${name}.apply(${callOn}, args); | ||
return ${callOn}.${name}.apply(${argsSpread}); | ||
};\n`; | ||
@@ -76,0 +77,0 @@ } |
@@ -117,4 +117,5 @@ "use strict"; | ||
requires, | ||
body: str | ||
body: str, | ||
hasArgs: !isAlwaysZeroArgs | ||
}; | ||
}; |
{ | ||
"name": "webidl2js", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "Auto-generates class structures for WebIDL specifications", | ||
@@ -5,0 +5,0 @@ "main": "lib/transformer.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40755
1193