Closed
Description
We have a custom module loader that uses full file paths to resolve files.
local units = VFS.Include("luaui/configs/unit_buildmenu_config.lua")
To get proper type inference we need to add @module
to every call.
---@module "unit_buildmenu_config"
local units = VFS.Include("luaui/configs/unit_buildmenu_config.lua")
It's possible to alias VFS.Include to act like require
:
"runtime.special": {
"VFS.include": "require"
},
But this won't work because VFS.Include
accepts a path, and require
accepts a module name. Is there any way to write a custom module resolver so that we can support VFS.Include
project-wide?
Metadata
Metadata
Assignees
Labels
No labels