Hi everyone, I have a very specific situation. I need to somehow return from module script the type so I don’t have to use the table access method. I think this is technically impossible.
for example what i need:
-- basic "table" type
export type someType = {
--some type data
}
return nil
and using is
local module = require("path.to.module")
local function some_function(): module.someType end-- <- sometimers looks very dirty in buisness logic. This is what I want to fix
and I need something like (this code doesn’t work if anything)
-- like, idk
return type {
-- type data
}
and required using is:
local module = require("path.to.module")
local function some_function(): someType end
I know about the base local type like
type someType = module.someType
but I need to do it somehow WITHOUT this