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

Function isPropertyInitializedInConstructor

test/fixtures/snapshot/typescript.js:84611–84620  ·  view source on GitHub ↗
(propName, propType, constructor)

Source from the content-addressed store, hash-verified

84609 return false;
84610 }
84611 function isPropertyInitializedInConstructor(propName, propType, constructor) {
84612 var reference = ts.isComputedPropertyName(propName)
84613 ? ts.factory.createElementAccessExpression(ts.factory.createThis(), propName.expression)
84614 : ts.factory.createPropertyAccessExpression(ts.factory.createThis(), propName);
84615 ts.setParent(reference.expression, reference);
84616 ts.setParent(reference, constructor);
84617 reference.flowNode = constructor.returnFlowNode;
84618 var flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType));
84619 return !(getFalsyFlags(flowType) & 32768 /* TypeFlags.Undefined */);
84620 }
84621 function checkInterfaceDeclaration(node) {
84622 // Grammar checking
84623 if (!checkGrammarDecoratorsAndModifiers(node))

Calls 3

getFlowTypeOfReferenceFunction · 0.85
getOptionalTypeFunction · 0.85
getFalsyFlagsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…