← Luau typing quick reference

Intersections

Luau 0.731 · --!strict
A & 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",
}

Complete inventory

View all pages in Luau typing quick reference
← Previous: typeofNext: any, unknown, and never →