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

Function checkArithmeticOperandType

test/fixtures/snapshot/typescript.js:78251–78259  ·  view source on GitHub ↗
(operand, type, diagnostic, isAwaitValid)

Source from the content-addressed store, hash-verified

78249 }
78250 }
78251 function checkArithmeticOperandType(operand, type, diagnostic, isAwaitValid) {
78252 if (isAwaitValid === void 0) { isAwaitValid = false; }
78253 if (!isTypeAssignableTo(type, numberOrBigIntType)) {
78254 var awaitedType = isAwaitValid && getAwaitedTypeOfPromise(type);
78255 errorAndMaybeSuggestAwait(operand, !!awaitedType && isTypeAssignableTo(awaitedType, numberOrBigIntType), diagnostic);
78256 return false;
78257 }
78258 return true;
78259 }
78260 function isReadonlyAssignmentDeclaration(d) {
78261 if (!ts.isCallExpression(d)) {
78262 return false;

Callers 3

Calls 3

isTypeAssignableToFunction · 0.85
getAwaitedTypeOfPromiseFunction · 0.85

Tested by

no test coverage detected