MCPcopy Index your code
hub / github.com/nodejs/node / shouldAddTypeMetadata

Function shouldAddTypeMetadata

test/fixtures/snapshot/typescript.js:92684–92690  ·  view source on GitHub ↗

* Determines whether to emit the "design:type" 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)

Source from the content-addressed store, hash-verified

92682 * @param node The node to test.
92683 */
92684 function shouldAddTypeMetadata(node) {
92685 var kind = node.kind;
92686 return kind === 169 /* SyntaxKind.MethodDeclaration */
92687 || kind === 172 /* SyntaxKind.GetAccessor */
92688 || kind === 173 /* SyntaxKind.SetAccessor */
92689 || kind === 167 /* SyntaxKind.PropertyDeclaration */;
92690 }
92691 /**
92692 * Determines whether to emit the "design:returntype" metadata based on the node's kind.
92693 * The caller should have already tested whether the node has decorators and whether the

Callers 2

addOldTypeMetadataFunction · 0.85
addNewTypeMetadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…