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

Function getContextualTypeForObjectLiteralMethod

test/fixtures/snapshot/typescript.js:72792–72799  ·  view source on GitHub ↗
(node, contextFlags)

Source from the content-addressed store, hash-verified

72790 // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one
72791 // exists. Otherwise, it is the type of the string index signature in T, if one exists.
72792 function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
72793 ts.Debug.assert(ts.isObjectLiteralMethod(node));
72794 if (node.flags & 33554432 /* NodeFlags.InWithStatement */) {
72795 // We cannot answer semantic questions within a with block, do not proceed any further
72796 return undefined;
72797 }
72798 return getContextualTypeForObjectLiteralElement(node, contextFlags);
72799 }
72800 function getContextualTypeForObjectLiteralElement(element, contextFlags) {
72801 var objectLiteral = element.parent;
72802 var propertyAssignmentType = ts.isPropertyAssignment(element) && getContextualTypeForVariableLikeDeclaration(element);

Callers 2

Calls 2

assertMethod · 0.80

Tested by

no test coverage detected