@@ -1555,12 +1555,15 @@ namespace ts {
15551555 return false ;
15561556 }
15571557
1558+ type SerializedEntityNameAsExpression = Identifier | BinaryExpression | PropertyAccessExpression ;
1559+ type SerializedTypeNode = SerializedEntityNameAsExpression | VoidExpression | ConditionalExpression ;
1560+
15581561 /**
15591562 * Serializes the type of a node for use with decorator type metadata.
15601563 *
15611564 * @param node The node that should have its type serialized.
15621565 */
1563- function serializeTypeOfNode ( node : Node ) : Expression {
1566+ function serializeTypeOfNode ( node : Node ) : SerializedTypeNode {
15641567 switch ( node . kind ) {
15651568 case SyntaxKind . PropertyDeclaration :
15661569 case SyntaxKind . Parameter :
@@ -1582,15 +1585,15 @@ namespace ts {
15821585 *
15831586 * @param node The node that should have its parameter types serialized.
15841587 */
1585- function serializeParameterTypesOfNode ( node : Node , container : ClassLikeDeclaration ) : Expression {
1588+ function serializeParameterTypesOfNode ( node : Node , container : ClassLikeDeclaration ) : ArrayLiteralExpression {
15861589 const valueDeclaration =
15871590 isClassLike ( node )
15881591 ? getFirstConstructorWithBody ( node )
15891592 : isFunctionLike ( node ) && nodeIsPresent ( node . body )
15901593 ? node
15911594 : undefined ;
15921595
1593- const expressions : Expression [ ] = [ ] ;
1596+ const expressions : SerializedTypeNode [ ] = [ ] ;
15941597 if ( valueDeclaration ) {
15951598 const parameters = getParametersOfDecoratedDeclaration ( valueDeclaration , container ) ;
15961599 const numParameters = parameters . length ;
@@ -1626,7 +1629,7 @@ namespace ts {
16261629 *
16271630 * @param node The node that should have its return type serialized.
16281631 */
1629- function serializeReturnTypeOfNode ( node : Node ) : Expression {
1632+ function serializeReturnTypeOfNode ( node : Node ) : SerializedTypeNode {
16301633 if ( isFunctionLike ( node ) && node . type ) {
16311634 return serializeTypeNode ( node . type ) ;
16321635 }
@@ -1637,8 +1640,6 @@ namespace ts {
16371640 return createVoidZero ( ) ;
16381641 }
16391642
1640- type SerializedTypeNode = SerializedEntityNameAsExpression | VoidExpression | ConditionalExpression ;
1641-
16421643 /**
16431644 * Serializes a type node for use with decorator type metadata.
16441645 *
@@ -1826,7 +1827,6 @@ namespace ts {
18261827 }
18271828 }
18281829
1829- type SerializedEntityNameAsExpression = Identifier | BinaryExpression | PropertyAccessExpression ;
18301830 /**
18311831 * Serializes an entity name as an expression for decorator type metadata.
18321832 *
0 commit comments