kailua_check 1.1.0

Type checker for Kailua
Documentation
-- definitions for Lua 5.1 basic library

--# -- TODO return generics
--# assume global `assert`:
--#     --[[ [assert] ]] function(v: any, message: string?)
--#
--# assume global `collectgarbage`:
--#     function(opt: string?, arg: any?) --> any
--#
--# assume global `dofile`:
--#     [geval] function(filename: string?) --> any
--#
--# assume global `error`:
--#     function(message: string, level: integer?) --> !
--#
--# assume global `_G`:
--#     [genv] table
--#
--# assume global `getfenv`:
--#     function(f: function|integer?) --> table
--#
--# assume global `getmetatable`:
--#     function(object: any) --> table
--#
--# assume global `ipairs`:
--#     [generic_pairs]
--#     function(t: vector<const WHATEVER>) -->
--#         (function(vector<const WHATEVER>, integer) --> (integer?, any),
--#          vector<const WHATEVER>, integer)
--#
--# -- TODO sequence conditional union: (function) | (nil, string)
--# assume global `load`:
--#     [geval] function(func: function() --> string?, chunkname: string?) --> (function, string)
--#
--# -- TODO sequence conditional union: (function) | (nil, string)
--# assume global `loadfile`:
--#     [geval] function(filename: string?) --> (function, string)
--#
--# -- TODO sequence conditional union: (function) | (nil, string)
--# assume global `loadstring`:
--#     [geval] function(string: string, chunkname: string?) --> (function, string)
--#
--# -- TODO genericity
--# assume global `next`:
--#     function(table: table, index: any?) --> (integer, any)
--#
--# assume global `pairs`:
--#     [generic_pairs] function(t: table) --> (function(table, any) --> (any?, any), table, any)
--#
--# -- TODO `f` should be once function
--# -- TODO genericity
--# assume global `pcall`:
--#     function(f: function, any...) --> (boolean, any...)
--#
--# assume global `print`:
--#     function(any...)
--#
--# assume global `rawequal`:
--#     function(v1: any, v2: any) --> boolean
--#
--# assume global `rawget`:
--#     function(table: table, index: any) --> any
--#
--# assume global `rawset`:
--#     function(table: table, index: any, value: any) --> table
--#
--# -- TODO genericity
--# assume global `select`:
--#     function(index: number|'#', any...) --> (any...)
--#
--# assume global `setfenv`:
--#     function(f: function|integer?, table: table) --> function
--#
--# assume global `setmetatable`:
--#     function(table: table, metatable: any?) --> table
--#
--# assume global `tonumber`:
--#     function(e: any, base: integer?) --> number
--#
--# assume global `tostring`:
--#     function(e: any) --> string
--#
--# -- TODO enumerate all the possibility?
--# assume global `type`:
--#     [type] function(v: any) --> string
--#
--# -- TODO genericity
--# assume global `unpack`:
--#     function(list: table, i: integer?, j: integer?) --> (any...)
--#
--# assume global `_VERSION`:
--#     string
--#
--# -- TODO `f` and `err` should be once function
--# -- TODO genericity
--# assume global `xpcall`:
--#     function(f: function, err: function) --> (boolean, any...)
--#
--# assume global `coroutine`:
--#     {
--#         -- TODO genericity
--#         `create`: function(f: function) --> thread;
--#         `resume`: function(co: thread, any...) --> (boolean, any...);
--#         `running`: function() --> thread;
--#         `status`: function(co: thread) --> string;
--#         -- TODO genericity
--#         `wrap`: function(f: function) --> thread;
--#         `yield`: function(any...) --> (any...);
--#         ...
--#     }