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

Function checkDeleteExpressionMustBeOptional

test/fixtures/snapshot/typescript.js:78382–78389  ·  view source on GitHub ↗
(expr, symbol)

Source from the content-addressed store, hash-verified

78380 return booleanType;
78381 }
78382 function checkDeleteExpressionMustBeOptional(expr, symbol) {
78383 var type = getTypeOfSymbol(symbol);
78384 if (strictNullChecks &&
78385 !(type.flags & (3 /* TypeFlags.AnyOrUnknown */ | 131072 /* TypeFlags.Never */)) &&
78386 !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* SymbolFlags.Optional */ : getFalsyFlags(type) & 32768 /* TypeFlags.Undefined */)) {
78387 error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_optional);
78388 }
78389 }
78390 function checkTypeOfExpression(node) {
78391 checkExpression(node.expression);
78392 return typeofType;

Callers 1

checkDeleteExpressionFunction · 0.85

Calls 3

getTypeOfSymbolFunction · 0.85
getFalsyFlagsFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected