{"id":26554,"library":"typescript-to-lua-t","title":"TypeScriptToLua-T","description":"A fork of TypeScriptToLua (TSTL) that replaces the TypeScript dependency with typescript-t for compatibility with ttypescript. It transpiles TypeScript code into Lua, supporting the full TypeScript type system and emitting idiomatic Lua output. This version is based on TSTL v0.20.0. It is not actively maintained by the original authors and is intended for projects using ttypescript. Key differentiators: custom TypeScript compiler fork integration, same API as TSTL.","status":"maintenance","version":"0.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript","lua","tstl","transpiler"],"install":[{"cmd":"npm install typescript-to-lua-t","lang":"bash","label":"npm"},{"cmd":"yarn add typescript-to-lua-t","lang":"bash","label":"yarn"},{"cmd":"pnpm add typescript-to-lua-t","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as the TypeScript compiler substitute; the fork patches require('typescript') calls.","package":"typescript-t","optional":false},{"reason":"Provides Lua type definitions for TypeScript, commonly used with TSTL.","package":"lua-types","optional":true}],"imports":[{"note":"Use this fork package name, not the original.","wrong":"import { transpileString } from 'typescript-to-lua'","symbol":"transpileString","correct":"import { transpileString } from 'typescript-to-lua-t'"},{"note":"ESM-only import style; require may not work in all environments.","wrong":"const transpileFiles = require('typescript-to-lua-t').transpileFiles","symbol":"transpileFiles","correct":"import { transpileFiles } from 'typescript-to-lua-t'"},{"note":"LuaTranspiler is a named export, not default.","wrong":"import LuaTranspiler from 'typescript-to-lua-t'","symbol":"LuaTranspiler","correct":"import { LuaTranspiler } from 'typescript-to-lua-t'"}],"quickstart":{"code":"import { transpileString } from 'typescript-to-lua-t';\n\nconst luaCode = transpileString('const x: number = 1;', {\n  luaTarget: '5.3',\n  noHeader: true,\n});\n\nconsole.log(luaCode); // Outputs: local x = 1","lang":"typescript","description":"Transpile a simple TypeScript variable declaration to Lua using the fork."},"warnings":[{"fix":"Install typescript-t and remove typescript: npm install typescript-t && npm uninstall typescript","message":"This fork uses typescript-t instead of typescript. Ensure typescript-t is installed and compatible.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Replace 'typescript-to-lua' with 'typescript-to-lua-t' in imports.","message":"Import paths must use 'typescript-to-lua-t' not 'typescript-to-lua'.","severity":"gotcha","affected_versions":"*"},{"fix":"Refer to TSTL v0.20.0 documentation for API specifics.","message":"The original TSTL v0.20.0 API is used; newer TSTL versions may have changes.","severity":"deprecated","affected_versions":"0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install and import from 'typescript-to-lua-t'.","cause":"Package name is typescript-to-lua-t, not typescript-to-lua.","error":"Cannot find module 'typescript-to-lua'"},{"fix":"Run: npm install typescript-t","cause":"The fork requires typescript-t, which may not be installed.","error":"Cannot find module 'typescript'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}