Comparing version 4.2.0 to 4.3.0
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ module.exports = new Set([ |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -81,4 +81,8 @@ "use strict"; | ||
} | ||
let maybeType = { type: overloads[0].operation.arguments[i].idlType, optional: overloads[0].optionalityList[i] !== "required" }; | ||
let maybeType = { | ||
type: overloads[0].operation.arguments[i].idlType, | ||
optional: overloads[0].optionalityList[i] !== "required", | ||
default: overloads[0].operation.arguments[i].default | ||
}; | ||
for (let j = 1; j < overloads.length; ++j) { | ||
@@ -90,3 +94,4 @@ if (overloads[j].optionalityList[i] !== "required") { | ||
const thisType = overloads[j].operation.arguments[i].idlType; | ||
if (maybeType.type.idlType !== thisType.idlType || maybeType.type.array !== thisType.array) { | ||
if (maybeType.type.idlType !== thisType.idlType || maybeType.type.array !== thisType.array || | ||
maybeType.default !== overloads[j].operation.arguments[i].default) { | ||
maybeType = null; | ||
@@ -93,0 +98,0 @@ } |
@@ -56,2 +56,7 @@ "use strict"; | ||
}`; | ||
if (conversion.default) { | ||
str += ` else { | ||
${name} = ${JSON.stringify(conversion.default.value)}; | ||
}`; | ||
} | ||
} | ||
@@ -58,0 +63,0 @@ } |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "webidl2js", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"description": "Auto-generates class structures for WebIDL specifications", | ||
@@ -5,0 +5,0 @@ "main": "index.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
951
32587