typescript-to-lua
Advanced tools
Changelog
0.17.0
We now support source maps in the standard JS v3 format. You can generate source maps with the --sourceMap
CLI argument, or by adding sourceMap: true
to your tsconfig. Inline source maps are also supported with --inlineSourceMap
CLI/tsconfig parameter.
Also added tstl option --sourceMapTraceback
, which will add an override to Lua's debug.traceback()
to each file, so source maps will automatically be applied to Lua stacktraces (i.e. in errors).
Made watch mode incremental.
Added support for Object.fromEntries
, array.flat
and array.flatMap
.
BREAKING CHANGE: Directive @tupleReturn
should now be specified per overload.
Fixed a bug where rest parameters would not transpile correctly.
Fixed an issue with escaped backticks.
Various small fixes function inference and array detection.
Changed testing framework to jest.
Changelog
0.16.0
self
parameter. This means that without further action calls to declaration functions might be given an extra argument.
this: void
to its declaration:
declare function foo(this: void, ...)
/** @noSelf */
:
/** @noSelf */ interface Foo {
/** @noSelfInFile */
at the top./** @luaIterator */
should now be put on types instead of on the functions returning them.>>
and >>>
in JS vs. Lua./** @noResolution */
directive to prevent path resolution on declared modules./** @luaIterator */
on types extending Array<T>
.undefined
as property name was not transpiled correctly.tstl
block in tsconfig.json. For example:{
"compilerOptions" : {}
"tstl": {
"luaTarget": "JIT"
}
}
console
calls to their Lua equivalent:
console.log(...)
-> print(...)
console.assert(...)
-> assert(...)
console.trace(...)
-> print(debug.traceback(...))
array.findIndex()
.array.sort()
not working with a compare function.Math.
functions and constants.upper()
.Changelog
0.15.2
Changelog
0.15.1
from
.WeakMap
and WeakSet
.Object.keys
and Object.assign
.Changelog
0.15.0
CommandLineParser.ts
to read CLI and tsconfig input.noHoisting
option in CLI or tsconfig.string.concat
, string.slice
and string.charCodeAt
.Changelog
0.14.0
(line, column)
instead of line: line, column: column
.--[[ Generated with https://github.com/Perryvw/TypescriptToLua ]]
.Changelog
0.13.0