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

Function isTypePresencePossible

test/fixtures/snapshot/typescript.js:70855–70861  ·  view source on GitHub ↗
(type, propName, assumeTrue)

Source from the content-addressed store, hash-verified

70853 return type;
70854 }
70855 function isTypePresencePossible(type, propName, assumeTrue) {
70856 var prop = getPropertyOfType(type, propName);
70857 if (prop) {
70858 return prop.flags & 16777216 /* SymbolFlags.Optional */ ? true : assumeTrue;
70859 }
70860 return getApplicableIndexInfoForName(type, propName) ? true : !assumeTrue;
70861 }
70862 function narrowByInKeyword(type, name, assumeTrue) {
70863 if (type.flags & 1048576 /* TypeFlags.Union */
70864 || type.flags & 524288 /* TypeFlags.Object */ && declaredType !== type

Callers 1

narrowByInKeywordFunction · 0.85

Calls 2

getPropertyOfTypeFunction · 0.85

Tested by

no test coverage detected