The satisfies operator checks a value against a contract without replacing its inferred type with that contract. It can catch a misspelled option early.
Worked example
type Config = {
mode: "dev" | "prod";
retries: number;
tags: readonly string[];
};
const defaults: Config = { mode: "dev", retries: 2, tags: ["api"] };
console.log({ ...defaults, retries: 4 } satisfies Config);Result
{ mode: 'dev', retries: 4, tags: [ 'api' ] }Implementation notes
A settings override can satisfy a type and still violate a runtime relationship between settings. Validate cross-field rules separately.
Try it yourself
Add an unknown option and inspect the error at the declaration.
Open the TypeScript example →Editorial date June 28, 2025 · Published December 6, 2026