🟧import

Import function of a single defined package.

install( string importPath, boolean async, Package parentPackage ) -> Promise/any

This function is just a global alias of the gpm.Import function.

This function can return a promise instead of the result of a packet execution.

Example Usage

local promise = import( "packages/glua-encoder.lua", true )
promise:Then( function( result )
    print( result )
end,
function( errorMessage )
    print( "Oh no, package import failed with error: " .. errorMessage )
end )

Last updated