Compile a Hello World from Typescript to Lua

With the help of https://typescripttolua.github.io/

compile

console.log("Hello");

to:

print("Hello")

Sources

index.ts

console.log("Hello");

tsconfig.json

{
  "$schema": "https://raw.githubusercontent.com/TypeScriptToLua/TypeScriptToLua/master/tsconfig-schema.json",
  "compilerOptions": {
    "target": "ESNext",
    "lib": ["ESNext","dom" ],
    "moduleResolution": "Node",
    "types": [],
    "strict": true
  },
  "tstl": {
    "luaTarget": "JIT"
  }
}

package.json

{
  "private": true,
  "scripts": {
    "build": "tstl",
    "dev": "tstl --watch"
  },
  "devDependencies": {
    "typescript-to-lua": "..."
  }
}

Download

20240910_hello-typescript-lua_180343.zip

created by:   ben  
last edited:  10.09.2024, 13:30:25  
generated:    10.09.2024, 18:03:43  

article source: hello-typescript-lua