The satisfies operator in TypeScript
Answer: The new satisfies operator lets us validate that the type of an expression matches some type, without changing the resulting type of that expression. (S1)
Example
type Colors = "red" | "green" | "blue";
type RGB = [number, number, number];
const palette = {
red: [255, 0, 0],
green: "#00ff00",
blue: [0, 0, 255],
} satisfies Record<Colors, string | RGB>;
palette.green.toUpperCase(); // OK: still known to be a string
palette.red.at(0); // OK: still a tuple
Annotation vs satisfies vs as
| Form | Checks? | Resulting type | |---|---|---| | const x: T = v | yes | T | | v satisfies T | yes | inferred type of v |
Annotations go after the thing being typed.
Claims
- id: C1 claim: satisfies validates a type without changing the resulting type. source: S1 evidence: "The new satisfies operator lets us validate that the type of an expression matches some"
- id: C2 claim: The release notes use satisfies with Record of Colors. source: S1 evidence: "} satisfies Record<Colors, string | RGB>;"
- id: C3 claim: Type annotations always go after the thing being typed. source: S2 evidence: "Type annotations will always go after the thing being typed."
- id: C4 claim: Variables can have an optional type annotation. source: S2 evidence: "you can optionally add a type annotation to explicitly specify the type of the variable:"
Sources
- [S1] TypeScript: Documentation - TypeScript 4.9. TypeScript (Microsoft). https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html . License: CC BY 4.0 (microsoft/TypeScript-Website). Accessed 2026-11-04.
- [S2] TypeScript: Documentation - Everyday Types. TypeScript (Microsoft). https://www.typescriptlang.org/docs/handbook/2/everyday-types.html . License: CC BY 4.0 (microsoft/TypeScript-Website). Accessed 2026-11-04.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: TypeScript (Microsoft), TypeScript: Documentation - TypeScript 4.9, CC BY 4.0 (microsoft/TypeScript-Website); TypeScript (Microsoft), TypeScript: Documentation - Everyday Types, CC BY 4.0 (microsoft/TypeScript-Website).
Cite this
iinventedlight. 2026. "The satisfies operator in TypeScript." iinventedlight Library, iil:note:1xbkjv9h, version of 2026-11-04. https://iinventedlight.com/library/notes/typescript-satisfies-operator/. License: CC-BY-4.0.
@misc{iil_note_1xbkjv9h,
author = {{iinventedlight}},
title = {{The satisfies operator in TypeScript}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-04},
url = {https://iinventedlight.com/library/notes/typescript-satisfies-operator/},
note = {Permanent ID iil:note:1xbkjv9h. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/typescript-satisfies-operator.md.