diff --git a/book-content/chapters/05-unions-literals-and-narrowing.md b/book-content/chapters/05-unions-literals-and-narrowing.md index 1b14c2c..72faf71 100644 --- a/book-content/chapters/05-unions-literals-and-narrowing.md +++ b/book-content/chapters/05-unions-literals-and-narrowing.md @@ -577,7 +577,7 @@ In this case, if `username` is not a string, we know it's `null` and could retur ```typescript function validateUsername(username: string | null | undefined): boolean { - if (typeof name !== "string") { + if (typeof username !== "string") { return false; }