From 7671d86d2f8360421b238602e453c9e70025cfb2 Mon Sep 17 00:00:00 2001 From: Atsushi Yamamoto Date: Wed, 5 Nov 2025 10:32:28 -0800 Subject: [PATCH] Fix typo in Narrowing.md Fix a typo (`is` -> `as`) --- packages/documentation/copy/en/handbook-v2/Narrowing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/documentation/copy/en/handbook-v2/Narrowing.md b/packages/documentation/copy/en/handbook-v2/Narrowing.md index 34044be7c6f5..8cd6583a6788 100644 --- a/packages/documentation/copy/en/handbook-v2/Narrowing.md +++ b/packages/documentation/copy/en/handbook-v2/Narrowing.md @@ -429,8 +429,8 @@ function isFish(pet: Fish | Bird): pet is Fish { } ``` -`pet is Fish` is our type predicate in this example. -A predicate takes the form `parameterName is Type`, where `parameterName` must be the name of a parameter from the current function signature. +`pet as Fish` is our type predicate in this example. +A predicate takes the form `parameterName as Type`, where `parameterName` must be the name of a parameter from the current function signature. Any time `isFish` is called with some variable, TypeScript will _narrow_ that variable to that specific type if the original type is compatible.