Skip to content

Commit 183e830

Browse files
authored
Merge pull request #441 from apify/ts-course-typo
fix: typo
2 parents b98170e + e598e7b commit 183e830

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

content/academy/switching_to_typescript/using_types.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ When hovering over the variable, we see that TypeScript was smart enough to infe
3030

3131
![Type of variable automatically inferred]({{@asset switching_to_typescript/images/number-inference.webp}})
3232

33-
Attempting to reassign `value` to be a type other than a string will result in a compiler error.
33+
Attempting to reassign `value` to be a type other than a number will result in a compiler error.
3434

3535
But what if we want to declare the variable with no initial value, then change it later?
3636

@@ -72,7 +72,8 @@ value = 10;
7272
// Totally ok
7373
value = 'hello academy!';
7474

75-
// This will throw a compiler error
75+
// This will throw a compiler error, because we didn't include
76+
// number arrays in our union type.
7677
value = [1, 2, 3]
7778
```
7879

0 commit comments

Comments
 (0)