ReviseAlgo Logo

Advanced Types

Satisfies Operator

Master the satisfies operator (introduced in TypeScript 4.9), validating object types against interfaces while preserving exact literal and narrow inferences.

Last Updated: July 29, 2026 10 min read

Introduced in TypeScript 4.9, the satisfies operator allows developers to validate that an expression matches a specified type or interface without widening or mutating the variable's inferred type.

1. The Problem satisfies Solves

Before TypeScript 4.9, validating an object against a type required explicit type annotations (const obj: Type = ...). However, explicit type annotations widen property types, losing precise literal inferences.

Standard Annotation (Loses Specificity)

2. The Solution: satisfies Operator

Using satisfies verifies that palette conforms to Palette, but preserves the exact, specific inferred type for every property key:

3. satisfies with Property Key Validation

satisfies is ideal for routing, config objects, and state dictionaries where you want to catch invalid keys while keeping autocomplete for exact routes:

4. Interactive Code Playground

Test the satisfies operator below:

5. Summary Comparison Table

PatternType ValidationProperty Type PreservationAutocomplete for Exact Keys
No AnnotationNoneFull SpecificityFull
const x: Type = ...ValidatedWidened to TypeRestricted to Type
const x = ... as TypeBypassed (Assertion)Forced to TypeRestricted to Type
| const x = ... satisfies Type | Validated | Full Specificity Preserved | Full |