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

Function checkTruthinessOfType

test/fixtures/snapshot/typescript.js:82808–82813  ·  view source on GitHub ↗
(type, node)

Source from the content-addressed store, hash-verified

82806 checkSourceElement(node.statement);
82807 }
82808 function checkTruthinessOfType(type, node) {
82809 if (type.flags & 16384 /* TypeFlags.Void */) {
82810 error(node, ts.Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness);
82811 }
82812 return type;
82813 }
82814 function checkTruthinessExpression(node, checkMode) {
82815 return checkTruthinessOfType(checkExpression(node, checkMode), node);
82816 }

Callers 2

onOperatorFunction · 0.85

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected