How does export type work, what use does it have exactly

Hello, Ive been trying to understand export type and the overall scripting space/possibilities of what it opens for scripting in roblox, I understand that is explicitly defines what constraints a value can have, but what exactly is this useful for, when would I use it, and does it help to reduce any boilerplate code format, any feedback is appreciated, thank you.

--module.luau
export type myType = number
local module = require()
local myValue: module.myType = 4

simple as that
i only use exported types if i use Types shared module, like if you were to use Constants module

2 Likes

types can be defined in one module, exported and required in multiple other scripts.
so this makes changing them later way easier.