@@ -1555,12 +1555,15 @@ namespace ts {
1555
1555
return false ;
1556
1556
}
1557
1557
1558
+ type SerializedEntityNameAsExpression = Identifier | BinaryExpression | PropertyAccessExpression ;
1559
+ type SerializedTypeNode = SerializedEntityNameAsExpression | VoidExpression | ConditionalExpression ;
1560
+
1558
1561
/**
1559
1562
* Serializes the type of a node for use with decorator type metadata.
1560
1563
*
1561
1564
* @param node The node that should have its type serialized.
1562
1565
*/
1563
- function serializeTypeOfNode ( node : Node ) : Expression {
1566
+ function serializeTypeOfNode ( node : Node ) : SerializedTypeNode {
1564
1567
switch ( node . kind ) {
1565
1568
case SyntaxKind . PropertyDeclaration :
1566
1569
case SyntaxKind . Parameter :
@@ -1582,15 +1585,15 @@ namespace ts {
1582
1585
*
1583
1586
* @param node The node that should have its parameter types serialized.
1584
1587
*/
1585
- function serializeParameterTypesOfNode ( node : Node , container : ClassLikeDeclaration ) : Expression {
1588
+ function serializeParameterTypesOfNode ( node : Node , container : ClassLikeDeclaration ) : ArrayLiteralExpression {
1586
1589
const valueDeclaration =
1587
1590
isClassLike ( node )
1588
1591
? getFirstConstructorWithBody ( node )
1589
1592
: isFunctionLike ( node ) && nodeIsPresent ( node . body )
1590
1593
? node
1591
1594
: undefined ;
1592
1595
1593
- const expressions : Expression [ ] = [ ] ;
1596
+ const expressions : SerializedTypeNode [ ] = [ ] ;
1594
1597
if ( valueDeclaration ) {
1595
1598
const parameters = getParametersOfDecoratedDeclaration ( valueDeclaration , container ) ;
1596
1599
const numParameters = parameters . length ;
@@ -1626,7 +1629,7 @@ namespace ts {
1626
1629
*
1627
1630
* @param node The node that should have its return type serialized.
1628
1631
*/
1629
- function serializeReturnTypeOfNode ( node : Node ) : Expression {
1632
+ function serializeReturnTypeOfNode ( node : Node ) : SerializedTypeNode {
1630
1633
if ( isFunctionLike ( node ) && node . type ) {
1631
1634
return serializeTypeNode ( node . type ) ;
1632
1635
}
@@ -1637,8 +1640,6 @@ namespace ts {
1637
1640
return createVoidZero ( ) ;
1638
1641
}
1639
1642
1640
- type SerializedTypeNode = SerializedEntityNameAsExpression | VoidExpression | ConditionalExpression ;
1641
-
1642
1643
/**
1643
1644
* Serializes a type node for use with decorator type metadata.
1644
1645
*
@@ -1826,7 +1827,6 @@ namespace ts {
1826
1827
}
1827
1828
}
1828
1829
1829
- type SerializedEntityNameAsExpression = Identifier | BinaryExpression | PropertyAccessExpression ;
1830
1830
/**
1831
1831
* Serializes an entity name as an expression for decorator type metadata.
1832
1832
*
0 commit comments