tl;dr export allows you to access the defined type from outside a ModuleScript:
-- ModuleScript
export type nullable<T> = T?
return nil
-- A different script
local module = require(path.to.ModuleScript)
local a: module.nullable<number> = 20 -- you can access the 'nullable' type in the ModuleScript
Just for a simplistic response, it lets you export a type. haha…
Types allow you to let Roblox and yourself know that a specific variable should contain a certain type of data… Such as a string or number.
Modulescripts can store types that can be accessed by other scripts like below:
Modulescript
export type my_type = string
Script
local my_module = require(my_module)
-- When coding, the type annotator will recognize this variable as a string.
local x: my_module.my_type = "Hello World"
When first learning this, I was worried about other uses that I did not know yet, but that is literally it!