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

Function checkForDisallowedESSymbolOperand

test/fixtures/snapshot/typescript.js:79254–79263  ·  view source on GitHub ↗
(operator)

Source from the content-addressed store, hash-verified

79252 }
79253 // Return true if there was no error, false if there was an error.
79254 function checkForDisallowedESSymbolOperand(operator) {
79255 var offendingSymbolOperand = maybeTypeOfKindConsideringBaseConstraint(leftType, 12288 /* TypeFlags.ESSymbolLike */) ? left :
79256 maybeTypeOfKindConsideringBaseConstraint(rightType, 12288 /* TypeFlags.ESSymbolLike */) ? right :
79257 undefined;
79258 if (offendingSymbolOperand) {
79259 error(offendingSymbolOperand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(operator));
79260 return false;
79261 }
79262 return true;
79263 }
79264 function getSuggestedBooleanOperator(operator) {
79265 switch (operator) {
79266 case 51 /* SyntaxKind.BarToken */:

Callers 1

Calls 2

errorFunction · 0.70

Tested by

no test coverage detected