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

Function getExactOptionalUnassignableProperties

test/fixtures/snapshot/typescript.js:66887–66892  ·  view source on GitHub ↗
(source, target)

Source from the content-addressed store, hash-verified

66885 return isUnitType(type) || !!(type.flags & 134217728 /* TypeFlags.TemplateLiteral */);
66886 }
66887 function getExactOptionalUnassignableProperties(source, target) {
66888 if (isTupleType(source) && isTupleType(target))
66889 return ts.emptyArray;
66890 return getPropertiesOfType(target)
66891 .filter(function (targetProp) { return isExactOptionalPropertyMismatch(getTypeOfPropertyOfType(source, targetProp.escapedName), getTypeOfSymbol(targetProp)); });
66892 }
66893 function isExactOptionalPropertyMismatch(source, target) {
66894 return !!source && !!target && maybeTypeOfKind(source, 32768 /* TypeFlags.Undefined */) && !!containsMissingType(target);
66895 }

Callers 1

reportRelationErrorFunction · 0.85

Calls 6

isTupleTypeFunction · 0.85
getPropertiesOfTypeFunction · 0.85
getTypeOfPropertyOfTypeFunction · 0.85
getTypeOfSymbolFunction · 0.85
filterMethod · 0.65

Tested by

no test coverage detected