Comparing version 1.0.0 to 1.0.1
@@ -38,2 +38,3 @@ "use strict"; | ||
"TopLevel.Array", | ||
"dw.object.Extensible", | ||
"dw.object.ExtensibleObject", | ||
@@ -112,3 +113,3 @@ "dw.object.SimpleExtensible" | ||
// return false; | ||
if (element === 'Iterator') { | ||
if (element === 'Iterator' || element === 'Iterable') { | ||
return true; | ||
@@ -200,7 +201,7 @@ } | ||
// if (theClass.hierarchy.find((h: any) => h.name === 'dw.object.ExtensibleObject')) { | ||
if (hierarchyClass === 'dw.object.ExtensibleObject') { | ||
if (hierarchyClass === 'dw.object.ExtensibleObject' || hierarchyClass === 'dw.object.Extensible') { | ||
generics = className + 'CustomAttributes'; | ||
customAttrTypes.add({ name: className }); | ||
} | ||
else if (theClass.hierarchy.find((h) => h.name === 'dw.object.ExtensibleObject')) { | ||
else if (theClass.hierarchy.find((h) => h.name === 'dw.object.ExtensibleObject' || h.name === 'dw.object.Extensible')) { | ||
// extends an extensible class, eg. ProductLineItem -> LineItem -> ExtensibleObject | ||
@@ -240,2 +241,3 @@ customAttrTypes.add({ name: className, extends: hierarchyClass }); | ||
let properties = Object.values(theClass.properties); | ||
properties = properties.filter(prop => !constants.find(co => co.name == prop.name)); // properties my duplicate constants | ||
source += properties | ||
@@ -282,3 +284,3 @@ .filter(filterProperties(className)) | ||
} | ||
return `${methodSource}${doc(method)}${isGlobal ? "declare function " : ""}${method.static && !isGlobal ? isStatic : ""}${method.name}(${method.args.map((m) => formatArgument(m, isGeneric)).join(", ")}): ${returnType};\n`; | ||
return `${methodSource}${doc(method)}${isGlobal ? "declare function " : ""}${method.static && !isGlobal ? isStatic : ""}${method.name.replace('@@iterator', '[Symbol.iterator]')}(${method.args.map((m) => formatArgument(m, isGeneric)).join(", ")}): ${returnType};\n`; | ||
}, ""); | ||
@@ -285,0 +287,0 @@ source += "\n"; |
{ | ||
"name": "sfcc-dts", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/tsplugin.js", |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12999164
440
63300
3