Socket
Socket
Sign inDemoInstall

typescript-to-lua

Package Overview
Dependencies
Maintainers
2
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-to-lua - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

24

dist/Transpiler.js

@@ -755,3 +755,3 @@ "use strict";

var name = this.transpileExpression(node.expression);
var params = this.transpileArguments(node.arguments, ts.createTrue());
var params = node.arguments ? this.transpileArguments(node.arguments, ts.createTrue()) : "true";
return name + ".new(" + params + ")";

@@ -1042,8 +1042,24 @@ };

var paramNames = [];
parameters.forEach(function (param) {
paramNames.push(param.name.escapedText);
});
var spreadIdentifier = "";
// Only push parameter name to paramName array if it isn't a spread parameter
for (var _i = 0, parameters_1 = parameters; _i < parameters_1.length; _i++) {
var param = parameters_1[_i];
var paramName = param.name.escapedText;
// This parameter is a spread parameter (...param)
if (!param.dotDotDotToken) {
paramNames.push(paramName);
}
else {
spreadIdentifier = paramName;
// Push the spread operator into the paramNames array
paramNames.push("...");
}
}
// Build function header
result += this.indent + this.accessPrefix(node) + ("function " + methodName + "(" + paramNames.join(",") + ")\n");
this.pushIndent();
// Push spread operator here
if (spreadIdentifier !== "") {
result += " local " + spreadIdentifier + " = { ... }\n";
}
result += this.transpileBlock(body);

@@ -1050,0 +1066,0 @@ this.popIndent();

12

package.json
{
"name": "typescript-to-lua",
"license": "MIT",
"version": "0.1.5",
"version": "0.1.6",
"repository": "https://github.com/Perryvw/TypescriptToLua",

@@ -24,15 +24,15 @@ "scripts": {

"dependencies": {
"yargs": "^11.0.0",
"typescript": "^2.7.2"
"typescript": "^2.8.3",
"yargs": "^11.1.0"
},
"devDependencies": {
"@types/node": "^9.4.7",
"@types/node": "^9.6.7",
"@types/yargs": "^11.0.0",
"alsatian": "^2.2.1",
"codecov": "^3.0.0",
"codecov": "^3.0.1",
"deep-equal": "^1.0.1",
"lua.vm.js": "0.0.1",
"nyc": "^11.5.0",
"nyc": "^11.7.1",
"tslint": "^5.9.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc