This looks like it's from the Intersection Types portion of the Language Specification. Specifically, the & is an intersection type literal. As for what it does:

Intersection types represent values that simultaneously have multiple types. A value of an intersection type A & B is a value that is both of type A and type B. Intersection types are written using intersection type literals (section 3.8.7).

The spec goes on to offer a helpful snippet to better understand the behavior:

Copyinterface 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

Because ab is both of type A and of type B, we can assign it to a and/or b. If ab were only of type B, we could only assign it to b.

The code you shared may be from this comment on GitHub, which mentions Intersection Types.

Answer from Sampson on Stack Overflow
🌐
TypeScript
typescriptlang.org › docs › handbook › 2 › typeof-types.html
TypeScript: Documentation - Typeof Type Operator
TypeScript adds a typeof operator you can use in a type context to refer to the type of a variable or property:
🌐
TypeScript
typescriptlang.org › docs › handbook › advanced-types.html
TypeScript: Documentation - Advanced Types
Luckily, you don’t need to abstract typeof x === "number" into its own function because TypeScript will recognize it as a type guard on its own. That means we could just write these checks inline. ... These typeof type guards are recognized in two different forms: typeof v === "typename" and typeof v !== "typename", where "typename" can be one of typeof operator’s return values ("undefined", "number", "string", "boolean", "bigint", "symbol", "object", or "function").
🌐
TypeScript
typescriptlang.org › docs › handbook › 2 › types-from-types.html
TypeScript: Documentation - Creating Types from Types
TypeScript’s type system is very powerful because it allows expressing types in terms of other types. The simplest form of this idea is generics. Additionally, we have a wide variety of type operators available to use.
🌐
Mimo
mimo.org › glossary › typescript › operator
TypeScript Operator: Syntax, Usage, and Examples
A TypeScript operator allows you to perform operations on data—whether you're assigning values, performing calculations, checking conditions, or spreading arrays. The operator TypeScript syntax looks familiar to JavaScript, but with added type safety and optional chaining that makes your ...
🌐
Dennis O'Keeffe
dennisokeeffe.com › blog › 2023-06-26-diving-into-typescripts-type-system-type-operators
Diving Into Typescript's Type System: Type Operators
June 26, 2023 - TypeScript, a statically typed superset of JavaScript, introduces several advanced type operators that can significantly improve your code's reliability and predictability. Among these powerful tools, keyof, index types, and index signatures stand ...
🌐
Graphite
graphite.com › guides › typescript-operators
Operators in TypeScript
This guide will cover the fundamental and advanced operators in TypeScript, providing a clear understanding of their syntax and practical usage. We'll explore various operators such as the ternary operator, spread operator, and more.
🌐
TutorialsPoint
tutorialspoint.com › home › typescript › typescript operators
TypeScript Operators
December 18, 2016 - TypeScript - null vs. undefined ... An operator defines some function that will be performed on the data. The data on which operators work are called operands.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › typescript › typescript-operators
TypeScript Operators - GeeksforGeeks
August 7, 2025 - TypeScript operators are symbols or keywords that perform operations on one or more operands.
🌐
TypeScript
typescriptlang.org › docs › handbook › 2 › everyday-types.html
TypeScript: Documentation - Everyday Types
JavaScript has three very commonly used primitives: string, number, and boolean. Each has a corresponding type in TypeScript. As you might expect, these are the same names you’d see if you used the JavaScript typeof operator on a value of those types:
🌐
GitHub
microsoft.github.io › TypeScript-New-Handbook › chapters › types-from-extraction
Types from Extraction
By combining various type operators, we can express complex operations and values in a succinct, maintainable way. In this chapter we'll cover ways to express a type in terms of an existing type or value. ... TypeScript adds a typeof operator you can use in a type context to refer to the type of a variable or property:
🌐
LogRocket
blog.logrocket.com › home › how to use type guards in typescript
How to use type guards in TypeScript - LogRocket Blog
June 4, 2024 - TypeScript uses built-in operators like typeof, instanceof, in, and is, which are used to determine if an object contains a property.
🌐
DEV Community
dev.to › tomoy › type-operators-keyof-and-typeof-in-typescript-3lb2
Type Operators (keyof and typeof) in TypeScript - DEV Community
April 16, 2023 - Perfect! We could skip defining the Person interface by referring to the person1 object. You can use typeof to retrieve the type of a value. (Please keep in mind that this typeof is the operator provided by TypeScript.
🌐
Medium
medium.com › @ndmangrule › unlocking-the-power-of-typescript-a-deep-dive-into-key-operators-794ffae1bfd2
Unlocking the Power of TypeScript: A Deep Dive into Key Operators | by Nitin Mangrule | Medium
June 4, 2025 - In this article, we’ll explore some essential TypeScript operators like as, satisfies, keyof, in, and others, with practical examples for each. The as operator is used for type assertion in TypeScript.
🌐
Learn TypeScript
learntypescript.dev › 07 › l5-in-type-guard
Using an `in` type guard | Learn TypeScript
In this lesson, we will learn about the in operator and how it can narrow the type of object structures. in is a JavaScript operator that can be used to check whether a property belongs to a particular object.
🌐
TypeScript
typescriptlang.org › docs › handbook › 2 › narrowing.html
TypeScript: Documentation - Narrowing
JavaScript has an operator for checking whether or not a value is an “instance” of another value. More specifically, in JavaScript x instanceof Foo checks whether the prototype chain of x contains Foo.prototype. While we won’t dive deep here, and you’ll see more of this when we get into classes, they can still be useful for most values that can be constructed with new. As you might have guessed, instanceof is also a type guard, and TypeScript narrows in branches guarded by instanceofs.
🌐
Allthingstypescript
allthingstypescript.dev › p › the-typeof-and-keyof-operators-referencing
The typeof and keyof operators - referencing variable types in Typescript
March 27, 2023 - As you can see, we created two Types - X and Y - and used the typeof operator to reference the types of variables x and y. And we can use it to reference types for all sorts of things - objects, arrays, object properties, etc. So far, so good. But we can do even better, and let’s introduce another Typescript operator - the keyof operator.
🌐
TypeScript
typescriptlang.org › docs › handbook › unions-and-intersections.html
TypeScript: Handbook - Unions and Intersection Types
The problem with padLeft in the above example is that its padding parameter is typed as any. That means that we can call it with an argument that’s neither a number nor a string, but TypeScript will be okay with it.
🌐
TypeScript
typescriptlang.org › docs › handbook › release-notes › typescript-3-7.html
TypeScript: Documentation - TypeScript 3.7
At its core, optional chaining lets us write code where TypeScript can immediately stop running some expressions if we run into a null or undefined. The star of the show in optional chaining is the new ?. operator for optional property accesses.
🌐
GitBook
basarat.gitbook.io › typescript › type-system › typeguard
Type Guard | TypeScript Deep Dive
TypeScript is aware of the usage of the JavaScript instanceof and typeof operators. If you use these in a conditional block, TypeScript will understand the type of the variable to be different within that conditional block.