8000 Fix typo in the spec · imskojs/TypeScript@4137a10 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4137a10

Browse files
committed
Fix typo in the spec
1 parent b14b7e9 commit 4137a10

File tree

3 files changed

+1
-1
lines changed

3 files changed

+1
-1
lines changed
Binary file not shown.
936 Bytes
Binary file not shown.

doc/spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ x = "hello"; // Ok
13231323
x = 42; // Ok
13241324
x = test; // Error, boolean not assignable
13251325
x = test ? 5 : "five"; // Ok
1326-
x = test ? 0 : false; // Error, number | boolean not asssignable
1326+
x = test ? 0 : false; // Error, number | boolean not assignable
13271327
```
13281328

13291329
it is possible to assign 'x' a value of type `string`, `number`, or the union type `string | number`, but not any other type. To access a value in 'x', a type guard can be used to first narrow the type of 'x' to either `string` or `number`:

0 commit comments

Comments
 (0)
0