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

Function getAugmentedPropertiesOfType

test/fixtures/snapshot/typescript.js:86696–86710  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

86694 // Return the list of properties of the given type, augmented with properties from Function
86695 // if the type has call or construct signatures
86696 function getAugmentedPropertiesOfType(type) {
86697 type = getApparentType(type);
86698 var propsByName = ts.createSymbolTable(getPropertiesOfType(type));
86699 var functionType = getSignaturesOfType(type, 0 /* SignatureKind.Call */).length ? globalCallableFunctionType :
86700 getSignaturesOfType(type, 1 /* SignatureKind.Construct */).length ? globalNewableFunctionType :
86701 undefined;
86702 if (functionType) {
86703 ts.forEach(getPropertiesOfType(functionType), function (p) {
86704 if (!propsByName.has(p.escapedName)) {
86705 propsByName.set(p.escapedName, p);
86706 }
86707 });
86708 }
86709 return getNamedMembers(propsByName);
86710 }
86711 function typeHasCallOrConstructSignatures(type) {
86712 return ts.typeHasCallOrConstructSignatures(type, checker);
86713 }

Callers 1

Calls 7

getApparentTypeFunction · 0.85
getPropertiesOfTypeFunction · 0.85
getSignaturesOfTypeFunction · 0.85
getNamedMembersFunction · 0.85
forEachMethod · 0.65
hasMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected