* Serializes the type of a node for use with decorator type metadata. * * @param node The node that should have its type serialized.
(node)
| 92728 | * @param node The node that should have its type serialized. |
| 92729 | */ |
| 92730 | function serializeTypeOfNode(node) { |
| 92731 | switch (node.kind) { |
| 92732 | case 167 /* SyntaxKind.PropertyDeclaration */: |
| 92733 | case 164 /* SyntaxKind.Parameter */: |
| 92734 | return serializeTypeNode(node.type); |
| 92735 | case 173 /* SyntaxKind.SetAccessor */: |
| 92736 | case 172 /* SyntaxKind.GetAccessor */: |
| 92737 | return serializeTypeNode(getAccessorTypeNode(node)); |
| 92738 | case 257 /* SyntaxKind.ClassDeclaration */: |
| 92739 | case 226 /* SyntaxKind.ClassExpression */: |
| 92740 | case 169 /* SyntaxKind.MethodDeclaration */: |
| 92741 | return factory.createIdentifier("Function"); |
| 92742 | default: |
| 92743 | return factory.createVoidZero(); |
| 92744 | } |
| 92745 | } |
| 92746 | /** |
| 92747 | * Serializes the types of the parameters of a node for use with decorator type metadata. |
| 92748 | * |
no test coverage detected