Add a way to import external types to Luau

As a Roblox developer, it is currently annoying to write projects with large type definitions because of how Luau imports external types.

Specifically, it requires requiring a module (that’s a weird phrase) in order to access external types. This is annoying because for larger projects, the type definitions may become large and obnoxious, putting them in separate files (akin to headers in C) makes sense so that they aren’t in the way, but this comes at the cost of convenience; namely, in order to import those types, I have to require a module that I never use.

I understand this is low priority and it might not even be a “real” issue, but it’s annoying and I would like it to change. To that effect, please add a keyword like import to act as an analog to export, allowing me to import a type from a module without having to require it.

If this was resolved it would make my life better by not making me intentionally include an unused variable in my code.

21 Likes