Skip to content

Glossary: TypeScript Basics

in operator

Also written: in

A JavaScript operator where `"tracking" in d` is true if object `d` has a property called `tracking`. TypeScript uses it to narrow unions of objects.

Where the book teaches it

Related terms

narrowinginstanceofunknown