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.14.0 to 0.14.1

23

CHANGELOG.md
# Changelog
## 0.14.0
* Reworked internal transpiler structure to be more suited for future extension.
* Reworked module and exports system.
* Added support for custom iterators.
* Improved formatting consistency.
* Errors are now reported with location `(line, column)` instead of `line: line, column: column`.
* Added back default lua header: `--[[ Generated with https://github.com/Perryvw/TypescriptToLua ]]`.
* Fixed some bugs with switches and breaks.
* Fixed several bugs with functions and context parameters.
## 0.13.0
* Reworked how functions are transpiled, see https://github.com/Perryvw/TypescriptToLua/wiki/Differences-Between-Functions-and-Methods
* Improved handling of types extending Array.
* Fixed several bugs with classes.
* Fixed issues with inherited accessors.
## 0.12.0
* Added detection of types extending Array.
* Added new JSDoc-style compiler directives, deprecated the old `!` decorators, see https://github.com/Perryvw/TypescriptToLua/wiki/Compiler-Directives
* Fixed bug with constructor default values.
* The Lualib is no longer included when not used.
* Fixed bug with unpack in LuaJIT.
## 0.11.0

@@ -4,0 +27,0 @@ * Fixed bug when throwing anything that was not a string. (@tomblind)

4

dist/CompilerOptions.d.ts
import * as ts from "typescript";
export interface CompilerOptions extends ts.CompilerOptions {
noHeader?: boolean;
luaTarget?: string;
luaLibImport?: string;
luaTarget?: LuaTarget;
luaLibImport?: LuaLibImportKind;
}

@@ -7,0 +7,0 @@ export declare enum LuaLibImportKind {

@@ -29,3 +29,3 @@ import * as ts from "typescript";

private readonly typeValidationCache;
constructor(program: ts.Program);
constructor(program: ts.Program, options: CompilerOptions);
setupState(): void;

@@ -32,0 +32,0 @@ transformSourceFile(node: ts.SourceFile): [tstl.Block, Set<LuaLibFeature>];

@@ -9,2 +9,3 @@ import * as ts from "typescript";

constructor(program: ts.Program);
private getOptions;
private reportErrors;

@@ -11,0 +12,0 @@ emitFilesAndReportErrors(): number;

@@ -12,6 +12,17 @@ "use strict";

this.program = program;
this.options = this.program.getCompilerOptions();
this.luaTransformer = new LuaTransformer_1.LuaTransformer(this.program);
this.options = this.getOptions(program);
this.luaTransformer = new LuaTransformer_1.LuaTransformer(this.program, this.options);
this.luaPrinter = new LuaPrinter_1.LuaPrinter(this.options);
}
getOptions(program) {
const options = program.getCompilerOptions();
// Make options case-insenstive
if (options.luaTarget) {
options.luaTarget = options.luaTarget.toLowerCase();
}
if (options.luaLibImport) {
options.luaLibImport = options.luaLibImport.toLocaleLowerCase();
}
return options;
}
reportErrors() {

@@ -18,0 +29,0 @@ // Get all diagnostics, ignore unsupported extension

{
"name": "typescript-to-lua",
"license": "MIT",
"version": "0.14.0",
"version": "0.14.1",
"repository": "https://github.com/Perryvw/TypescriptToLua",

@@ -6,0 +6,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

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