Intersections
Luau 0.731 · --!strictA & B
Require a value to satisfy both types, which is useful when combining small reusable contracts.
When to use it
Read this page when you need to apply Intersections, verify its exact contract, and adapt the example without bypassing validation or host boundaries.
Focused example
--!strict
type Identified = { id: string }
type Named = { name: string }
type NamedEntity = Identified & Named
local item: NamedEntity = {
id = "meditation-1",
name = "Morning calm",
}