Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hazzard993/love-typescript-definitions
Write LÖVE 2D projects with TypeScript
https://github.com/hazzard993/love-typescript-definitions
love2d lua typescript typescript-declaration typescript-definitions typescripttolua
Last synced: 4 days ago
JSON representation
Write LÖVE 2D projects with TypeScript
- Host: GitHub
- URL: https://github.com/hazzard993/love-typescript-definitions
- Owner: hazzard993
- License: mit
- Created: 2018-09-10T05:24:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-04T11:51:16.000Z (about 1 month ago)
- Last Synced: 2025-01-01T04:08:51.123Z (11 days ago)
- Topics: love2d, lua, typescript, typescript-declaration, typescript-definitions, typescripttolua
- Homepage:
- Size: 1.46 MB
- Stars: 118
- Watchers: 6
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-love2d - LÖVE TypeScript Definitions - Write LÖVE games with TypeScript. (Development)
README
Contains declaration files to build [LÖVE 2D](https://love2d.org/) projects with TypeScript!
Built for use with [TypeScriptToLua](https://github.com/TypeScriptToLua/TypeScriptToLua). Check out [love-typescript-template](https://github.com/hazzard993/love-typescript-template) to get a sample project to build off.
Or run the following in a terminal to try it out:
```sh
# Requires NPX and Love2D to be available via cli
npm init -y
npm install -D typescript-to-lua typescript love-typescript-definitions
echo '{ "compilerOptions": { "target": "ESNext", "lib": ["ESNext"], "moduleResolution": "Node", "types": ["love-typescript-definitions", "@typescript-to-lua/language-extensions"] }, "tstl": { "luaTarget": "JIT" } }' > tsconfig.json
echo "love.draw = () => { love.graphics.print('Hello World') };" > main.ts
npx tstl -p tsconfig.json
love .
```> TIP: Use _tstl_'s watch mode (`--watch`) if you're after fast and automatic transpilation as files are updated.
Available on NPM.
```sh
npm install love-typescript-definitions
```## Other Definitions / Tools to Help
- [tstl-anim8](https://github.com/maxiy01/tstl-anim8) declarations for anim8, a small animation library for LÖVE.
- [tstl-flux](https://github.com/maxiy01/tstl-flux) declarations for flux, a fast, lightweight tweening library for Lua.
- [tstl-roomy](https://github.com/maxiy01/tstl-roomy) declarations for roomy, a small screen-management lua module.