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

Function inferTypeFromPrefixUnaryExpression

test/fixtures/snapshot/typescript.js:157080–157094  ·  view source on GitHub ↗
(node, usage)

Source from the content-addressed store, hash-verified

157078 addCandidateType(usage, ts.isCallExpression(node) ? checker.getVoidType() : checker.getAnyType());
157079 }
157080 function inferTypeFromPrefixUnaryExpression(node, usage) {
157081 switch (node.operator) {
157082 case 45 /* SyntaxKind.PlusPlusToken */:
157083 case 46 /* SyntaxKind.MinusMinusToken */:
157084 case 40 /* SyntaxKind.MinusToken */:
157085 case 54 /* SyntaxKind.TildeToken */:
157086 usage.isNumber = true;
157087 break;
157088 case 39 /* SyntaxKind.PlusToken */:
157089 usage.isNumberOrString = true;
157090 break;
157091 // case SyntaxKind.ExclamationToken:
157092 // no inferences here;
157093 }
157094 }
157095 function inferTypeFromBinaryExpression(node, parent, usage) {
157096 switch (parent.operatorToken.kind) {
157097 // ExponentiationOperator

Callers 1

calculateUsageOfNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected