* Determines whether to emit the "design:paramtypes" metadata based on the node's kind. * The caller should have already tested whether the node has decorators and whether the * emitDecoratorMetadata compiler option is set. * * @param node The node to test.
(node)
| 92706 | * @param node The node to test. |
| 92707 | */ |
| 92708 | function shouldAddParamTypesMetadata(node) { |
| 92709 | switch (node.kind) { |
| 92710 | case 257 /* SyntaxKind.ClassDeclaration */: |
| 92711 | case 226 /* SyntaxKind.ClassExpression */: |
| 92712 | return ts.getFirstConstructorWithBody(node) !== undefined; |
| 92713 | case 169 /* SyntaxKind.MethodDeclaration */: |
| 92714 | case 172 /* SyntaxKind.GetAccessor */: |
| 92715 | case 173 /* SyntaxKind.SetAccessor */: |
| 92716 | return true; |
| 92717 | } |
| 92718 | return false; |
| 92719 | } |
| 92720 | function getAccessorTypeNode(node) { |
| 92721 | var accessors = resolver.getAllAccessorDeclarations(node); |
| 92722 | return accessors.setAccessor && ts.getSetAccessorTypeAnnotationNode(accessors.setAccessor) |
no outgoing calls
no test coverage detected
searching dependent graphs…