Skip to content

luau

luau
local luau = require("@std/luau")

luau.compile

Compiles Luau source code into bytecode.

luau
(source: string) -> Bytecode

luau.load

Loads bytecode into a callable function. chunkname names the chunk for error messages.

An optional env table can be provided to override the global environment for the loaded chunk.

luau
(bytecode: Bytecode, chunkname: string?, env: { [any]: any }?) -> (...any) -> ...any

luau.loadModule

Loads and executes the Luau file at requirePath, returning its result.

An optional env table can be provided to override the global environment.

luau
(requirePath: path.Pathlike, env: { [any]: any }?) -> any

luau.resolveModule

Resolves the require path modulepath relative to frompath, returning the absolute path.

luau
(modulepath: string, frompath: path.Pathlike) -> path.Pathlike

luau.typeofModule

Returns the type pack representing the return types of the module at modulepath, or nil if unavailable.

luau
(modulepath: path.Pathlike) -> TypePack?