From 889250fb5baa2d8f09b31114273f614f0968e5da Mon Sep 17 00:00:00 2001 From: Nikola Vrhovac Date: Sun, 15 Sep 2024 16:30:00 +0200 Subject: [PATCH] Update 05-unions-literals-and-narrowing.md Fix the spelling of "sale" into "sake" in chapter 5. --- book-content/chapters/05-unions-literals-and-narrowing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book-content/chapters/05-unions-literals-and-narrowing.md b/book-content/chapters/05-unions-literals-and-narrowing.md index 72faf71..5c03a3f 100644 --- a/book-content/chapters/05-unions-literals-and-narrowing.md +++ b/book-content/chapters/05-unions-literals-and-narrowing.md @@ -380,7 +380,7 @@ This lets us call `toUpperCase` on `year` when it's a `string`, and `toFixed` on However, anywhere outside of the conditional block the type of `year` is still the union `string | number`. This is because narrowing only applies within the block's scope. -For the sale of illustration, if we add a `boolean` to the `year` union, the first `if` block will still end up with a type of `string`, but the `else` block will end up with a type of `number | boolean`: +For the sake of illustration, if we add a `boolean` to the `year` union, the first `if` block will still end up with a type of `string`, but the `else` block will end up with a type of `number | boolean`: ```typescript const getAlbumYear = (year: string | number | boolean) => {