Security News
Internet Archive Hacked, 31 Million Record Compromised
The Internet Archive's "Wayback Machine" has been hacked and defaced, with 31 millions records compromised.
typescript-to-lua
Advanced tools
A generic TypeScript to Lua transpiler. Write your code in TypeScript and publish Lua!
A generic TypeScript to Lua transpiler. Write your code in TypeScript and publish Lua!
Large projects written in Lua can become hard to maintain and make it easy to make mistakes. Writing code in TypeScript instead improves maintainability, readability and robustness, with the added bonus of good tooling support (including ESLint, Prettier, Visual Studio Code and WebStorm). This project is useful in any environment where Lua code is accepted, with the powerful option of simply declaring any existing API using TypeScript declaration files.
To install TypeScriptToLua add the typescript-to-lua
npm package:
$ npm install -D typescript-to-lua
This package includes the tstl
command line application, which can be used similarly to tsc
:
$ npx tstl
For more information, check out Getting Started in our documentation.
0.40.0
Added support for using external Lua code in your project. This means you can create and install node_modules packages containing Lua code. It also lets you include Lua source files as part of your source files. Used Lua will automatically be added to your output. For more information, see the External Lua Code page in the docs.
[Breaking] Removed support for deprecated annotations that have been replaced with language extensions: /** @luaIterator */
, /** @vararg */
, /** @luatable */
and /** forRange */
. If you were still using these, see the docs for instructions how to upgrade.
Added support for array.entries()
.
Added support for LuaTable.has(key)
and LuaTable.delete(key)
to the language extensions. See docs for more info.
Made language extension types more strict, disallowing null
and undefined
in some places where they would cause problems in Lua.
Fixed an issue where using TypeScript transformer plugins would cause invalid namespace and module code, as well as breaking hoisting.
Fixed invalid switch statement output when the default
clause was not the last clause in the switch.
Fixed missing LuaLib dependency when using string.split
.
Fixed lots of bundling bugs and issues, also added the TypeScriptToLua header to the top of the bundle unless noHeader is specified.
Under the hood:
FAQs
A generic TypeScript to Lua transpiler. Write your code in TypeScript and publish Lua!
The npm package typescript-to-lua receives a total of 1,443 weekly downloads. As such, typescript-to-lua popularity was classified as popular.
We found that typescript-to-lua demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Internet Archive's "Wayback Machine" has been hacked and defaced, with 31 millions records compromised.
Security News
TC39 is meeting in Tokyo this week and they have approved nearly a dozen proposals to advance to the next stages.
Security News
Our threat research team breaks down two malicious npm packages designed to exploit developer trust, steal your data, and destroy data on your machine.