Teal type definition for LÖVE, an awesome framework you can use to make 2D games in Lua. Based on definitions provided by love-api.
Note that this does not include type definition of bit, FFI, LuaSocket, ENet, and utf8 libraries!
Lists of function (variants) that are currently blacklisted due to limitations in generate_tl.lua
:
You need to cast at various places due to Teal lacking record inheritance (see #4). Example simple usage.
function love.load()
global myimage = love.graphics.newImage("path/to/image.png")
local imageW, imageH = (myimage as love.graphics.Texture):getDimensions()
print("Width", imageW, "Height", imageH)
end
function love.draw()
love.graphics.draw(myimage as love.graphics.Drawable)
end