You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

typescript-to-lua

Package Overview
Dependencies
Maintainers
2
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-to-lua

A generic TypeScript to Lua transpiler. Write your code in TypeScript and publish Lua!


Version published
Weekly downloads
1.4K
increased by44.7%
Maintainers
2
Created
Weekly downloads
 

Changelog

Source

1.5.0

  • Added support for Array.from and Array.of
  • Added support for beforeEmit hook to plugins that runs after tstl is totally done, but before emitting the result.
    • For more info about plugin hooks, see: https://typescripttolua.github.io/docs/api/plugins
  • Added support for import expressions (import("./module").then(m => m.foo());)
  • Added tsconfig setting lua51AllowTryCatchInAsyncAwait to disable restrictions on try/catch in combination with async/await in 5.1 (default: false)
  • Added tsconfig setting noImplicitGlobalVariables to disable tstl making variables global in non-module files.
  • Various lualib optimizations
  • JSDoc comments from input TS are now also part of output Lua as LDoc comments.
    • Can be disabled with removeComments tsconfig setting.
  • Rewrote how try/catch works in async functions, fixing many bugs.
  • Fixed a bug where methods with non-null expressions (i.e. obj.method!()) would not pass the correct self parameter, causing runtime errors.
  • Fixed a bug where symlinked node_modules (for example when using npm link) were not recognized as external dependencies by module resolution.
  • Fixed a bug with sourcemap traceback leading to invalid lua
  • Improved sourcemap traceback interaction with loadstring

Readme

Source
TypeScriptToLua

TypeScriptToLua

CI status Coverage Chat with us!

Documentation | Try Online | Changelog | Contribution guidelines

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.

Getting Started

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.

Keywords

FAQs

Package last updated on 01 Jun 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc