> ## Content Index
> Fetch the complete content index at: https://sudosecurity.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# TypeScript 4.9: "Satisfies" Operator Finds Coding Mistakes
- URL: https://sudosecurity.org/typescript-satisfies-operator/
- Published: 2022-09-29T21:19:00.000Z
- Updated: 2026-11-11T03:34:36.000Z
- Description: Microsoft’s TypeScript 4.9, a planned upgrade to the popular, strongly typed language that builds on JavaScript, is now in beta, featuring a satisfies operator that can catch errors. With satisfies, developers can validate that the type of an expression matches some type, without changing the…
- Author: Traven
- Tags: Node.js, TypeScript, JavaScript, #coderoasis-archive, Programming, Web Development, Software Development

Microsoft’s TypeScript 4.9, a planned upgrade to the popular, strongly typed language that builds on JavaScript, is now in beta, featuring a `satisfies` operator that can catch errors.

With `satisfies`, developers can validate that the type of an expression matches some type, without changing the resulting type of the expression. This operator can be used to catch possible errors, such as ensuring that an object has all the keys of some type, but no more than that.

Also in TypeScript 4.9, the `in` operator has been made more powerful when narrowing types that do not list the property. Instead of leaving them as is, the language will intersect their types with `Record<”property-key-being-checked”, unknown>`.

[Introduced September 23](https://devblogs.microsoft.com/typescript/announcing-typescript-4-9-beta/?ref=sudosecurity.org), the TypeScript 4.9 beta can be downloaded [through NuGet](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild?ref=sudosecurity.org) or via NPM using the following command:

```bash
npm install -D [email protected]
```

Other new capabilities and improvements in the TypeScript 4.9 beta:

- File watching is powered by file system events by default, only falling back to polling if developers fail to set up event-based watchers. This should provide a less resource-intensive experience when running `–-watch` mode or running with a TypeScript-powered editor like Visual Studio Code or Visual Studio.
- `Promise.resolve` now uses the `Awaited` type to unwrap Promise-like types passed to it. This means that it more often returns the right `Promise` type, but that improved type can break existing code if it was expecting `any` or `unknown` instead of a `Promise`.
- TypeScript now errors on direct comparisons against the NaN value and will suggest some variation of `Number.isNAN` instead.

TypeScript has been on an upswing. CircleCI’s [2022 State of Software Delivery](https://www2.circleci.com/2022-state-of-software-delivery.html?ref=sudosecurity.org) report found that TypeScript had surpassed JavaScript as the most popular devops language. CircleCI cited developer-friendliness as a reason for the surge.

A production release of TypeScript 4.9 is due in November, preceded by a release candidate. TypeScript 4.8 shipped on August 25, with correctness and consistency improvements as well as file watching fixes.