← All notes

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

Sources

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

Permanent ID: iil:note:1xbkjv9h

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.},
}

Markdown

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.