diff --git a/doc/TypeScript Language Specification (Change Markup).docx b/doc/TypeScript Language Specification (Change Markup).docx index 893f2e7ed22..24e7d1b623a 100644 Binary files a/doc/TypeScript Language Specification (Change Markup).docx and b/doc/TypeScript Language Specification (Change Markup).docx differ diff --git a/doc/TypeScript Language Specification.docx b/doc/TypeScript Language Specification.docx index 4aaa3bf92fe..4eb94908b57 100644 Binary files a/doc/TypeScript Language Specification.docx and b/doc/TypeScript Language Specification.docx differ diff --git a/doc/spec.md b/doc/spec.md index fe2147be477..a7947b19926 100644 --- a/doc/spec.md +++ b/doc/spec.md @@ -1323,7 +1323,7 @@ x = "hello"; // Ok x = 42; // Ok x = test; // Error, boolean not assignable x = test ? 5 : "five"; // Ok -x = test ? 0 : false; // Error, number | boolean not asssignable +x = test ? 0 : false; // Error, number | boolean not assignable ``` 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`: