MCPcopy Create free account
hub / github.com/nodejs/node / inferReverseMappedType

Function inferReverseMappedType

test/fixtures/snapshot/typescript.js:68250–68256  ·  view source on GitHub ↗
(sourceType, target, constraint)

Source from the content-addressed store, hash-verified

68248 return links.type;
68249 }
68250 function inferReverseMappedType(sourceType, target, constraint) {
68251 var typeParameter = getIndexedAccessType(constraint.type, getTypeParameterFromMappedType(target));
68252 var templateType = getTemplateTypeFromMappedType(target);
68253 var inference = createInferenceInfo(typeParameter);
68254 inferTypes([inference], sourceType, templateType);
68255 return getTypeFromInference(inference) || unknownType;
68256 }
68257 function getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties) {
68258 var properties, _i, properties_2, targetProp, sourceProp, targetType, sourceType;
68259 return __generator(this, function (_a) {

Callers 3

createReverseMappedTypeFunction · 0.85

Calls 6

getIndexedAccessTypeFunction · 0.85
createInferenceInfoFunction · 0.85
inferTypesFunction · 0.85
getTypeFromInferenceFunction · 0.85

Tested by

no test coverage detected