This content appears to be sourced from the Intersection Types section of the Language Specification. Specifically, using the &
symbol denotes an intersection type literal. In essence, an intersection type combines multiple types into one.
Intersection types signify values that possess characteristics of multiple types simultaneously. An instance of an intersection type A & B embodies attributes of both type A and type B. These are represented through intersection type literals as described in section 3.8.7 of the spec.
The specification also provides a code snippet for better comprehension:
interface A { a: number }
interface B { b: number }
var ab: A & B = { a: 1, b: 1 };
var a: A = ab; // A & B assignable to A
var b: B = ab; // A & B assignable to B
Since variable ab
holds properties of both type A
and type B
, it can be assigned to variables a
and/or b
. If ab
were exclusively of type B
, it would only be assignable to variable b
.
The source of this information could possibly be traced back to this comment on GitHub, which discusses Intersection Types.