ltd

love-typescript-definitions

Write LÖVE 2D projects with TypeScript

Showing:

Popularity

Downloads/wk

559

GitHub Stars

70

Maintenance

Last Commit

24d ago

Contributors

8

Package

Dependencies

0

License

MIT

Type Definitions

Built-In

Tree-Shakeable

No?

Categories

Readme

TypeScriptToLua + LÖVE 2D

LÖVE 2D TypeScript Definitions

LÖVE 2D TypeScriptToLua npm Build status

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, Yarn, and Love2D to be available via cli
yarn init -y
yarn add -D typescript-to-lua love-typescript-definitions
echo '{ "compilerOptions": { "lib": ["ESNext"], "types": ["love-typescript-definitions", "typescript-to-lua/language-extensions"] }}' > 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.

yarn add love-typescript-definitions
# or
npm install love-typescript-definitions

This version comes with documentation (node_modules/love-typescript-definitions/docs/index.html).

See the wiki for information on getting started building a project and CHANGELOG.md for recent changes.

Other Definitions / Tools to Help

  • lua-types declarations for the various Lua environments. Allows LuaJIT specific functions to be used.
  • peachy-types for using peachy, a parser/renderer for Aseprite animations in LÖVE.
  • encompass-ecs, a powerful engine-agnostic framework to help you code games, or other kinds of simulations.
  • vscode-typescript-to-lua plugin for VSCode. Highlights errors you'd encounter with TypeScriptToLua and gives tsconfig.json information all within the editor.
  • local-lua-debugger-vscode, a simple Lua debugger which requires no additional dependencies. Works with TypeScriptToLua and LÖVE.
  • TypeScriptGame, an example game made with these declarations by @yancouto
  • tstl-lurker declarations for lurker. Allows code TypeScript code to be hotswapped with a running Lua game.
  • UTF-8 the utf8 module included with LÖVE 2D.
  • 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.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial