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.39.0
@phantom
, @metaExtension
, @extension
, @pureAbstract
compiler annotations. As of this version these will no longer function! For help upgrading your code see the deprecated annotation docs.LuaTable<TKey, TValue>
language extension. This allows the use of barebones Lua tables for key-value storage, without suffering from JS's forced string indexes. For more information see the LuaTable docs.@vararg
. Instead, tstl will figure out itself when use of the Lua ellipsis token (...
) is appropriate. Also language extension $vararg
was added to force use of the ellipsis token. See the docs for more information.trailingComments
and leadingComments
fields to statements in the Lua AST. These can be modified by plugins to emit comments in the output lua. For an example see the add-comments test plugin.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.