Skip to content

Commit 1700c38

Browse files
committed
fix(typos): fix some typos found in the book content
1 parent 34c6541 commit 1700c38

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

book-content/chapters/04-essential-types-and-annotations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ type ShoppingCart = {
11861186

11871187
There are a few different ways to express an array of objects.
11881188

1189-
One approach would be to to create a new `Ingredient` type that we can use to represent the objects in the array:
1189+
One approach would be to create a new `Ingredient` type that we can use to represent the objects in the array:
11901190

11911191
```ts twoslash
11921192
type Ingredient = {

book-content/chapters/07-mutability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,6 @@ const buttonsToChange: (
10081008
)[];
10091009
```
10101010
1011-
But again, this is still typed strongly enough to to satisfy `modifyButtons`.
1011+
But again, this is still typed strongly enough to satisfy `modifyButtons`.
10121012
10131013
When using `as const` like this acts like a hint to TypeScript that it should infer a literal type where it wouldn't otherwise. This can be occasionally useful for when you want to allow mutation, but still want to infer a literal type.

book-content/chapters/10-deriving-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Use the `typeof` keyword whenever you need to extract types based on runtime val
196196

197197
### You Can't Create Runtime Types from Values
198198

199-
We've seen that `typeof` can create types from runtime values, but it's important to note that there is no way to to create a value from a type.
199+
We've seen that `typeof` can create types from runtime values, but it's important to note that there is no way to create a value from a type.
200200

201201
In other words, there is no `valueof` operator:
202202

@@ -559,7 +559,7 @@ Your task is to update the `Environment` type so that it is derived from the `co
559559

560560
### Exercise 3: Accessing Specific Values
561561

562-
Here were have an `programModeEnumMap` object that keeps different groupings in sync. There is also a `ProgramModeMap` type that uses `typeof` to represent the entire enum mapping:
562+
Here we have an `programModeEnumMap` object that keeps different groupings in sync. There is also a `ProgramModeMap` type that uses `typeof` to represent the entire enum mapping:
563563

564564
```typescript
565565
export const programModeEnumMap = {

book-content/chapters/11-annotations-and-assertions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ This allows us to specify that the values we pass to our configuration object mu
10341034

10351035
Let's work through the solutions for `satisfies`, `as`, and variable annotations.
10361036

1037-
#### When to Use `satifies`
1037+
#### When to Use `satisfies`
10381038

10391039
For the first scenario that uses a `Record`, the `satisfies` keyword won't work because we can't add dynamic members to an empty object.
10401040

@@ -1193,4 +1193,4 @@ const routes = {
11931193

11941194
Now our tests pass expected.
11951195

1196-
This setup of combining `as const` and `satisfies` is ideal when you need a particular shape for a configuration object and want while enforcing immutability.
1196+
This setup of combining `as const` and `satisfies` is ideal when you need a particular shape for a configuration object while enforcing immutability.

0 commit comments

Comments
 (0)