intersection type

A type written A & B that requires a value to satisfy both types at once, combining their properties.

In more detail

Identifiable & Timestamps & TenantScoped builds one record type from reusable pieces. If both sides give the same property incompatible types, such as string and number, that property becomes never and no value can be created.

Example

type DatabaseRecord = Identifiable & Timestamps & TenantScoped;

Related terms

Taught in

References