News for hackers. Stuff that matters.
Re:You can now write React in Lua by k__ on Monday June 24, 2024 @05:35AM (#40774019)
Thanks!

I found Teal, which seems to Lua what TypeScript is to JavaScript

Re:You can now write React in Lua by hombre_fatal on Monday June 24, 2024 @11:41AM (#40777388)
I use Teal for Pico8 game development. It's great.
Re:You can now write React in Lua by boredtofears on Monday June 24, 2024 @02:25PM (#40779206)
There's also a Typescript to Lua transpiler https://typescripttolua.github.io/

I've used it successfully with Love2d projects (albeit with some quirks)

Re:You can now write React in Lua by k__ on Tuesday June 25, 2024 @12:18PM (#40790373)
Lol, that's great.

What are the quirks?

Re:You can now write React in Lua by boredtofears on Tuesday June 25, 2024 @12:32PM (#40790527)
Mostly that Lua datatypes don’t always have great analogs in TS (particularly tables) and you have to be pretty cognizant of what’s going on under the hood.

All of these, too: https://typescripttolua.github.io/docs/caveats

Re:You can now write React in Lua by oblio on Monday June 24, 2024 @06:19PM (#40781637)
Interesting, what do they do about missing type info? Is there some repo of types for popular libraries?
Re:You can now write React in Lua by k__ on Tuesday June 25, 2024 @12:19PM (#40790377)
No idea, probably nothing.
Re:You can now write React in Lua by 0x6d on Tuesday June 25, 2024 @12:54PM (#40790790)
There's the official teal-types[1] project that aims to fill that gap only for standard Lua. I've used the LÖVE types[2] in the past.

1: https://github.com/teal-language/teal-types/tree/master/type... 2: https://github.com/MikuAuahDark/love2d-tl