kailua_check 1.1.0

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

--# type local tm = {
--#     year: integer, month: integer, day: integer,
--#     hour: integer?, min: integer?, sec: integer?, isdst: boolean?
--# }
--#
--# assume global `os`:
--#     {
--#         `clock`: function() --> number;
--#         -- TODO it is very hard to recognize '*t'|!'*t' from other string types, ugh
--#         `date`: function(format: string?, time: tm?) --> string | {
--#             year: integer, month: integer, day: integer,
--#             hour: integer, min: integer, sec: integer,
--#             wday: integer, yday: integer, isdst: boolean
--#         };
--#         `difftime`: function(t2: number, t1: number) --> number;
--#         `execute`: function(command: string?) --> integer;
--#         -- TODO diverging function signature
--#         `exit`: function(code: integer?);
--#         `getenv`: function(varname: string) --> string;
--#         -- TODO sequence conditional union: (true) | (nil, string)
--#         -- there is also an undocumented 3rd return type (integer) for errno, omitted here
--#         `remove`: function(filename: string) --> (boolean, string);
--#         -- TODO sequence conditional union: (true) | (nil, string)
--#         `rename`: function(oldname: string, newname: string) --> (boolean, string);
--#         `setlocale`: function(locale: string?, category: string?) --> string;
--#         `time`: function(table: tm?) --> integer;
--#         `tmpname`: function() --> string;
--#         ...
--#     }