-
Hi, I'm writing the type definitions for the Minetest Mod API. Minetest runs all its mods sandboxed so they can't access each others source code, for this reason, they restricted the `require` functio…
-
```ts
function func({a, b, c}) {}
```
results into
```lua
function(____bindingPattern0)
a = ____bindingPattern0.a
b = ____bindingPattern0.b
c = ____bindingPattern0…
wyozi updated
4 years ago
-
Presumably just to keep us on our toes, MoonSharp was implemented with one syntactical addition over regular Lua. These come in the form of [short anonymous functions](https://www.moonsharp.org/moonlu…
-
Add an option to `tstl` that produces a single-file output. This is useful for environments where only a single Lua artifact can be provided such as Tabletop Simulator. This will avoid the need for se…
-
__TS__ForEach does not necessarily parse the full arrays if the keys do not represent the array count. The function does not take into consideration gaps between index keys and will attempt to loop th…
-
```ts
/** @vararg */
interface Vararg extends Array {}
/* Transpiled:
function vararger(...)
end
*/
function vararger(...args: Vararg): void {}
/* Transpiled:
function hello(a, b, ...)
…
-
a.ts
```
/** @noSelfInFile */
((x=>x) as any)(0)
```
```
$ npx tstl a.ts
```
a.lua
```
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
(function(x) return x end)(_…
zaoqi updated
4 years ago
-
I am currently using these types with TypeScriptToLua, they are so so helpful, thanks!
Would you, or have you considered naming `@types/wow-declarations`? It would require no `tsconfig.json` update…
-
This is very much a suggestion/topic for discussion only..
Consider exporting this with the wow api version
i.e.
If we are on WoW api `8.2.0` then versions could be `8.2.0.1`, `8.2.0.13`, e…
-
```ts
console.log([].reduce(() => {}, undefined)); // should be undefined
```
[TypescriptToLua Playground](https://typescripttolua.github.io/play.html#src=console.log(%5B%5D.reduce(()%20%3D%3E%20…