Skip to main content

TypeScript satisfies Operator in Practice

The satisfies operator checks that an expression matches a type without widening the inferred type. const config = { theme: ‘dark’ } satisfies Config still infers ‘dark’ rather tha…

April 19, 2026 JavaScript chris 1 min read TypeScript

Article takeaway

The satisfies operator checks that an expression matches a type without widening the inferred type. const config = { theme: 'dark' } satisfies Config still infers 'dark' rather tha…

The satisfies operator checks that an expression matches a type without widening the inferred type. const config = { theme: 'dark' } satisfies Config still infers 'dark' rather than string.

This is the answer to the long-standing tension between type checking and literal-type inference. Use it for config objects, route maps, and discriminated union builders.

It does not change runtime behaviour — satisfies erases like any other type assertion. It is purely an inference helper.

Share X / Twitter LinkedIn

Leave a comment

Related Posts