You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/spec.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1869,7 +1869,7 @@ A type alias serves as an alias for the type specified in the type alias declara
1869
1869
1870
1870
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.
1871
1871
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)).
1873
1873
1874
1874
It is an error for the type specified in a type alias to depend on that type alias. Types have the following dependencies:
1875
1875
@@ -1916,7 +1916,8 @@ However, doing so means the following capabilities are lost:
1916
1916
1917
1917
* An interface can be named in an extends or implements clause, but a type alias for an object type literal cannot.
1918
1918
* 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.
1920
1921
1921
1922
## <a name="3.10"/>3.10 Type Relationships
1922
1923
@@ -2789,7 +2790,7 @@ These operators require their operands to be of type Any, the Number primitive t
2789
2790
2790
2791
### <aname="4.15.2"/>4.15.2The+operator
2791
2792
2792
-
Thebinary+operatorrequiresbothoperandstobeoftheNumberprimitivetypeor 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
+
Thebinary+operatorrequiresbothoperandstobeoftheNumberprimitivetypeor 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.
0 commit comments