---
title: "In operator narrowing"
description: "You can use the 'in' operator to narrow the type of a variable."
dependencies: []
link: "https://www.typescriptlang.org/docs/handbook/2/narrowing.html#the-in-operator-narrowing"
---