Skip to content

Commit 88bc0d1

Browse files
committed
Minor updates to Type Aliases section
1 parent 5b56d37 commit 88bc0d1

5 files changed

+4
-3
lines changed
-204 Bytes
Binary file not shown.
-750 Bytes
Binary file not shown.
166 Bytes
Binary file not shown.
-561 Bytes
Binary file not shown.

doc/spec.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,7 +1869,7 @@ A type alias serves as an alias for the type specified in the type alias declara
18691869
18701870
Type aliases are referenced using type references ([3.7.2](#3.7.2)). Writing a reference to a type alias has ***exactly*** the same effect as writing the aliased type itself.
18711871
1872-
The *Identifier* of a type alias declaration may not be one of the predefined type names (section [3.7.1](#3.7.1)). Furthermore, the *Type* of a type alias may not be an object type literal (section [3.7.3](#3.7.3)) or a parenthesized form of an object type literal, but any other kind of type composed from an object type literal is permitted.
1872+
The *Identifier* of a type alias declaration may not be one of the predefined type names (section [3.7.1](#3.7.1)).
18731873
18741874
It is an error for the type specified in a type alias to depend on that type alias. Types have the following dependencies:
18751875
@@ -1916,7 +1916,8 @@ However, doing so means the following capabilities are lost:
19161916
19171917
* An interface can be named in an extends or implements clause, but a type alias for an object type literal cannot.
19181918
* An interface can have multiple merged declarations, but a type alias for an object type literal cannot.
1919-
* An interface is referenced by its name in error messages and tooling, but a type alias is always expanded to its structural representation.
1919+
* An interface can have type parameters, but a type alias for an object type literal cannot.
1920+
* An interface is referenced by its name in error messages and tooling, but a type alias is always expanded to its structural representation.
19201921
19211922
## <a name="3.10"/>3.10 Type Relationships
19221923
@@ -2789,7 +2790,7 @@ These operators require their operands to be of type Any, the Number primitive t
27892790

27902791
### <a name="4.15.2"/>4.15.2 The + operator
27912792

2792-
The binary + operator requires both operands to be of the Number primitive type or an enum type, or at least one of the operands to be of type Any or the String primitive type. Operands of an enum type are treated as having the primitive type Number. If one operand is the `null` or `undefine``d` value, it is treated as having the type of the other operand. If both operands are of the Number primitive type, the result is of the Number primitive type. If one or both operands are of the String primitive type, the result is of the String primitive type. Otherwise, the result is of type Any.
2793+
The binary + operator requires both operands to be of the Number primitive type or an enum type, or at least one of the operands to be of type Any or the String primitive type. Operands of an enum type are treated as having the primitive type Number. If one operand is the `null` or `undefined` value, it is treated as having the type of the other operand. If both operands are of the Number primitive type, the result is of the Number primitive type. If one or both operands are of the String primitive type, the result is of the String primitive type. Otherwise, the result is of type Any.
27932794

27942795
||Any|Boolean|Number|String|Other|
27952796
|:---:|:---:|:---:|:---:|:---:|:---:|

0 commit comments

Comments
 (0)