typescript-to-lua
Advanced tools
Comparing version 0.14.0 to 0.14.1
# 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) |
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
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
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
291974
4936
0