What does "export" do?

hello. are there any uses for this? i couldnt find any documentation for it, so im asking here

image

Take a type, such as X

type X = {
  foo: string
}

When working with ModuleScripts, this exposes the X type to the requiring module

export type x = {
  foo: string
}

return ...
local fooScript = require(script.FooScript)

local x: fooScript.X = {foo = "Cat"}
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.