You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings, in our codebase we have type exports at class declaration through the codebase e.g. export type Stuff = typeof(table)
If one of these types works its way into another file that hasn't required it you can't use the type as far as I'm aware e.g. -- other module local a: Stuff = func() -- a is recognized as Stuff and checked properly
Roblox LSP handles this by letting you add the directory back into the Workspace: Library list. After which all exported types are recognized everywhere. I think this feature would be useful to some people if you considered adding it.
I looked at definitions files and such but it didn't quite do what I wanted. I also saw #84 which might allow for part of this though I'm not sure.
The text was updated successfully, but these errors were encountered:
Exporting types into the global scope is something you would have to ask Luau to support.
As far as I am aware, they are not interested in supporting such functionality
I get that it's not in the language spec, that's why I wrote "an option". If this project just wants to stay on the spec, I get it. The hack on the other LSP works just good enough that I think it's useful.
Yeah, we try to not deviate from the Luau type system at all. Implementing something like this is hard without Luau support. There are also negatives to "global types" in the same way _G. is typically not recommended
Greetings, in our codebase we have type exports at class declaration through the codebase e.g.
export type Stuff = typeof(table)
If one of these types works its way into another file that hasn't required it you can't use the type as far as I'm aware e.g.
-- other module local a: Stuff = func() -- a is recognized as Stuff and checked properly
Roblox LSP handles this by letting you add the directory back into the Workspace: Library list. After which all exported types are recognized everywhere. I think this feature would be useful to some people if you considered adding it.
I looked at definitions files and such but it didn't quite do what I wanted. I also saw #84 which might allow for part of this though I'm not sure.
The text was updated successfully, but these errors were encountered: