dorkhub

love-typescript-definitions

Write LÖVE 2D projects with TypeScript

hazzard993
13312 forksMITupdated 4 months ago
git clone https://github.com/hazzard993/love-typescript-definitions.githazzard993/love-typescript-definitions
TypeScriptToLua + LÖVE 2D

LÖVE 2D TypeScript Definitions

LÖVE 2D npm

Contains declaration files to build LÖVE 2D projects with TypeScript!

Built for use with TypeScriptToLua. Check out love-typescript-template to get a sample project to build off.

Or run the following in a terminal to try it out:

# 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.

npm install love-typescript-definitions

Other Definitions / Tools to Help

  • tstl-anim8 declarations for anim8, a small animation library for LÖVE.
  • tstl-flux declarations for flux, a fast, lightweight tweening library for Lua.
  • tstl-roomy declarations for roomy, a small screen-management lua module.

more like this

Scythe

SCYTHE is a lightweight, C#-based game engine focused on modifiability and rapid iteration using Raylib.

C#50

tobira.nvim

Open the next door in your Vim journey — personalized command discovery based on your actual usage

Lua51

search

search projects, people, and tags