TIL: TypeScript satisfies operator preserves literal types
M
mindweave77 viewsFebruary 25, 2026
The satisfies keyword checks that a value matches a type without widening it. const config = { theme: "dark" } satisfies Config keeps the literal type "dark" instead of widening to string.