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

Function tryGiveBetterPrimaryError

test/fixtures/snapshot/typescript.js:79353–79368  ·  view source on GitHub ↗
(errNode, maybeMissingAwait, leftStr, rightStr)

Source from the content-addressed store, hash-verified

79351 }
79352 }
79353 function tryGiveBetterPrimaryError(errNode, maybeMissingAwait, leftStr, rightStr) {
79354 var typeName;
79355 switch (operatorToken.kind) {
79356 case 36 /* SyntaxKind.EqualsEqualsEqualsToken */:
79357 case 34 /* SyntaxKind.EqualsEqualsToken */:
79358 typeName = "false";
79359 break;
79360 case 37 /* SyntaxKind.ExclamationEqualsEqualsToken */:
79361 case 35 /* SyntaxKind.ExclamationEqualsToken */:
79362 typeName = "true";
79363 }
79364 if (typeName) {
79365 return errorAndMaybeSuggestAwait(errNode, maybeMissingAwait, ts.Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap, typeName, leftStr, rightStr);
79366 }
79367 return undefined;
79368 }
79369 }
79370 function getBaseTypesIfUnrelated(leftType, rightType, isRelated) {
79371 var effectiveLeft = leftType;

Callers 1

reportOperatorErrorFunction · 0.85

Calls 1

Tested by

no test coverage detected