Replies: 1 comment 2 replies
-
One way to do it is to use auto debugLib = Luau::getMutable<Luau::TableType>(Luau::getGlobalBinding(globals, "debug"));
debugLib->props["custom"] = Luau::makeProperty(makeFunction(arena, std::nullopt, {builtinTypes.stringType}, {}), "@luau/global/debug.custom"); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on code analysis tool that works with multiple files. In order to properly detecting global variables from other files, I have to manually add them to luau. For that I'm using addGlobalBinding function which works very well. The issue is that if I want to change a definition of a manually added table (adding/removing table fields,...), I don't have a proper solution for that, or at least I didn't found one. What I'm currently doing is creating a new luau frontend and adding all custom stuff again. Is there a proper way of removing/updating a type definition from global bindings?
Beta Was this translation helpful? Give feedback.
All reactions