Skip to content

Commit 6ade929

Browse files
authored
reference username instead of name
1 parent 399c25f commit 6ade929

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book-content/chapters/05-unions-literals-and-narrowing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ In this case, if `username` is not a string, we know it's `null` and could retur
577577

578578
```typescript
579579
function validateUsername(username: string | null | undefined): boolean {
580-
if (typeof name !== "string") {
580+
if (typeof username !== "string") {
581581
return false;
582582
}
583583

0 commit comments

Comments
 (0)