{"id":13512035,"url":"https://github.com/andremm/typedlua","last_synced_at":"2025-04-05T06:06:38.903Z","repository":{"id":8665272,"uuid":"10320933","full_name":"andremm/typedlua","owner":"andremm","description":"An Optional Type System for Lua","archived":false,"fork":false,"pushed_at":"2020-03-11T21:54:53.000Z","size":11909,"stargazers_count":575,"open_issues_count":28,"forks_count":49,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-03-29T05:04:52.843Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andremm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-27T19:11:05.000Z","updated_at":"2025-03-26T05:09:29.000Z","dependencies_parsed_at":"2022-07-08T06:20:42.738Z","dependency_job_id":null,"html_url":"https://github.com/andremm/typedlua","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andremm%2Ftypedlua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andremm%2Ftypedlua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andremm%2Ftypedlua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andremm%2Ftypedlua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andremm","download_url":"https://codeload.github.com/andremm/typedlua/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294536,"owners_count":20915340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T03:01:26.086Z","updated_at":"2025-04-05T06:06:38.877Z","avatar_url":"https://github.com/andremm.png","language":"Lua","funding_links":[],"categories":["Lua","资源","Resources"],"sub_categories":["Analysis Tools and ASTs","Lua 5.1"],"readme":"# Typed Lua\n[![Build Status](https://travis-ci.org/andremm/typedlua.svg?branch=master)](https://travis-ci.org/andremm/typedlua)\n\n**Please note that Typed Lua is not being actively maintained. For an active type checker for Lua see [tl](https://github.com/hishamhm/tl).**\n\nTyped Lua is a typed superset of Lua that compiles to plain Lua.\nIt provides optional type annotations, compile-time type checking, and\nclass-based object oriented programming through the definition of classes,\ninterfaces, and modules.\n\n# Requirements for running the compiler\n\n1. Lua \u003e= 5.1\n1. [LPeg](http://www.inf.puc-rio.br/%7Eroberto/lpeg/) \u003e= 0.12\n\n# Install\n\nTyped Lua must be installed in a standard location; [LuaRocks](http://luarocks.org) will do this, and will also install the LPeg dependency automatically.\n\n        $ [install luarocks]\n        $ luarocks install typedlua-scm-1.rockspec\n\n# Usage\n\n        $ tlc [options] [filename]\n\n# Compiler options\n\n        -h       print this help\n        -d name  dump the AST (after typechecking) to file 'name'\n        -o name  output to file 'name' (default is 'tlc.lua')\n        -c       ansi colors on\n        -p       print the AST in Metalua format (before typechecking)\n        -s       strict mode on\n        -v       print current version\n        -w       warnings on (consistent-subtyping, unused locals)\n\n# Runtime module loader\n\nTyped Lua also provides a runtime loader to use Typed Lua modules on any\nstandard Lua virtual machine:\n\n```lua\nrequire \"typedlua\"\npackage.path = \"./?.tl;\" .. package.path\n\n-- It will load my_module.tl if it exists:\nlocal my_module = require \"my_module\"\nlocal my_file = loadfile \"my_file.tl\"\n```\n\nThe loader functions use the file extension (chunk name extension in the cases\nof load and loadstring) to decide whether it contains Typed Lua (.tl) or plain\nLua. If you want to force loading the chunks as Typed Lua you can use the\nfunctions provided by the typedlua module (these work like their standard Lua\ncounterparts):\n\n```lua\nlocal typedlua = require \"typedlua\"\ntypedlua.loadstring(string, chunkname)\ntypedlua.load(func, chunkname)\ntypedlua.loadfile(filename)\ntypedlua.dofile(filename)\n```\n\n# License\n\nReleased under the MIT License (MIT)\n\nCopyright (c) 2013 Andre Murbach Maidl\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandremm%2Ftypedlua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandremm%2Ftypedlua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandremm%2Ftypedlua/lists"}