lua-astra 0.28.1

🔥 Blazingly Fast 🔥 web server runtime for Lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---@meta

import = require

---@param modName string
function import(modName)
	---@diagnostic disable-next-line: param-type-mismatch, undefined-global
	local ok, import_result = pcall(astra_internal__import, modName)
	if not ok then
		ok, require_result = require(modName)
		if not ok then
			error("Failed to load module.\nImport Error:" .. import_result .. "\nError: " .. require_result)
		end
		return result
	end
	return result
end