diff --git a/lib/parsers/analyzeFunctionSignature.js b/lib/parsers/analyzeFunctionSignature.js index a8bd531..1b60dcc 100644 --- a/lib/parsers/analyzeFunctionSignature.js +++ b/lib/parsers/analyzeFunctionSignature.js @@ -34,7 +34,9 @@ const analyzeFunctionSignature = (code) => { capturedParams = params .map((param) => { if (isDestructuring) { - return `{${param.properties.map((prop) => prop.key.name).join(", ")}}`; + // return `{${param.properties.map((prop) => prop.key.name).join(", ")}}`; + // Add support to rename prop + return `{${param.properties.map((prop) => (prop.value.name ? `${prop.key.name}: ${prop.value.name}` : prop.key.name)).join(", ")}}`; } return param.name; }) @@ -51,7 +53,9 @@ const analyzeFunctionSignature = (code) => { capturedParams = params .map((param) => { if (isDestructuring) { - return `{${param.properties.map((prop) => prop.key.name).join(", ")}}`; + // return `{${param.properties.map((prop) => prop.key.name).join(", ")}}`; + // Add support to rename prop + return `{${param.properties.map((prop) => (prop.value.name ? `${prop.key.name}: ${prop.value.name}` : prop.key.name)).join(", ")}}`; } return param.name; }) diff --git a/package.json b/package.json index 66f9d34..0c53ab6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "alem", "description": "Create web3 applications for NEAR BOS with a focus on performance and friendly development.", - "version": "1.0.0-beta.24", + "version": "1.0.0-beta.25", "main": "main.js", "types": "index.d.ts", "author": "Wenderson Pires - wendersonpires.near",