summaryrefslogtreecommitdiff
path: root/meta/template/package.lua
blob: 8c18e10bf66b68914e53e5e2b11a08c27ea8aa2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---@meta

---#if VERSION >=5.4 then
---#DES 'require>5.4'
---@param modname string
---@return unknown
---@return unknown loaderdata
function require(modname) end
---#else
---#DES 'require<5.3'
---@param modname string
---@return unknown
function require(modname) end
---#end

---#DES 'package'
---@class packagelib
---#DES 'package.config'
---@field config    string
---#DES 'package.cpath'
---@field cpath     string
---#DES 'package.loaded'
---@field loaded    table
---#DES 'package.path'
---@field path      string
---#DES 'package.preload'
---@field preload   table
package = {}

---@version <5.1
---#DES 'package.loaders'
package.loaders = {}

---#DES 'package.loadlib'
---@param libname string
---@param funcname string
---@return any
function package.loadlib(libname, funcname) end

---#DES 'package.searchers'
---@version >5.2
package.searchers = {}

---#DES 'package.searchpath'
---@version >5.2,JIT
---@param name string
---@param path string
---@param sep? string
---@param rep? string
---@return string? filename
---@return string? errmsg
function package.searchpath(name, path, sep, rep) end

---#DES 'package.seeall'
---@version <5.1
---@param module table
function package.seeall(module) end

return package